> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Record Form Assignment

> Record that staff sent, linked, or handed over these forms for this patient.

Called at the moment staff act, from the surfaces that reach no other endpoint: an
SMS send goes out as a chat draft carrying no form id, and Copy Form Link issues no
request at all. Without a row those forms have no sender, and a ``{provider.*}`` fill
refuses.

Gated like the form list this is sent from, because writing a row here decides whose
name a later consent carries.

Not a fill gate. It records who handed the form over — it never decides who may open
one. Any authenticated patient can still open any form by path, which is deliberate:
intake forms are shared as public links.

A stale form id records the rest rather than failing the batch. The console fires
this without awaiting it — the forms have already gone out either way — so refusing
the whole batch over one archived form would silently strand every other form in the
send, with nothing on screen to say why.



## OpenAPI

````yaml post /forms/assignment
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /forms/assignment:
    post:
      tags:
        - Forms
      summary: Record Form Assignment
      description: >-
        Record that staff sent, linked, or handed over these forms for this
        patient.


        Called at the moment staff act, from the surfaces that reach no other
        endpoint: an

        SMS send goes out as a chat draft carrying no form id, and Copy Form
        Link issues no

        request at all. Without a row those forms have no sender, and a
        ``{provider.*}`` fill

        refuses.


        Gated like the form list this is sent from, because writing a row here
        decides whose

        name a later consent carries.


        Not a fill gate. It records who handed the form over — it never decides
        who may open

        one. Any authenticated patient can still open any form by path, which is
        deliberate:

        intake forms are shared as public links.


        A stale form id records the rest rather than failing the batch. The
        console fires

        this without awaiting it — the forms have already gone out either way —
        so refusing

        the whole batch over one archived form would silently strand every other
        form in the

        send, with nothing on screen to say why.
      operationId: record_form_assignment_forms_assignment_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordFormAssignmentPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: Response Record Form Assignment Forms Assignment Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RecordFormAssignmentPayload:
      properties:
        patientId:
          type: string
          title: Patientid
        formIds:
          items:
            type: string
          type: array
          title: Formids
      type: object
      required:
        - patientId
        - formIds
      title: RecordFormAssignmentPayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````