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

# Create a collaboration request



## OpenAPI

````yaml /openapi.yaml post /collaboration_requests
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /collaboration_requests:
    post:
      tags:
        - CollaborationRequest
      summary: Create a collaboration request
      operationId: collaboration_requests#create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyCollaborationRequestCreate'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/collaboration_request'
        '403':
          description: Forbidden
        '404':
          description: Not found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    requestBodyCollaborationRequestCreate:
      type: object
      description: >-
        The subject param and settings depend on request_type —
        project_items_edit takes project_id, column_slugs, editable_column_slugs
        and filter; purchase_order_edit takes purchase_order_id, header_fields
        and item_fields (header_fields may include `attachments`, the order's
        documents).
      properties:
        project_id:
          type: integer
        purchase_order_id:
          type: integer
        request_type:
          type: string
          enum:
            - project_items_edit
            - purchase_order_edit
        name:
          type: string
        message:
          type: string
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
        column_slugs:
          type: array
          items:
            type: string
        editable_column_slugs:
          type: array
          items:
            type: string
        header_fields:
          type: array
          items:
            type: string
        item_fields:
          type: array
          items:
            type: string
        filter:
          $ref: '#/components/schemas/filter'
        recipients:
          $ref: '#/components/schemas/requestBodyCollaborationRecipients'
      required:
        - request_type
        - name
        - recipients
    collaboration_request:
      type: object
      properties:
        id:
          type: integer
        request_type:
          type: string
          enum:
            - project_items_edit
            - purchase_order_edit
        status:
          type: string
          enum:
            - open
            - closed
        expired:
          type: boolean
          description: True once expires_at has passed (status stays open).
        name:
          type: string
        message:
          type: string
          nullable: true
        link_url:
          type: string
          description: >-
            The request's address on the collaborator side. Holds no secret;
            only signed-in recipients can open it.
        subject:
          $ref: '#/components/schemas/collaboration_subject'
        recipients:
          type: array
          description: >-
            Active recipients first (in the order added; the creator is one
            too), then revoked ones.
          items:
            $ref: '#/components/schemas/collaboration_request_recipient'
        column_slugs:
          type: array
          description: >-
            project_items_edit only. Ordered list of every column shared with
            the collaborator.
          items:
            type: string
        editable_column_slugs:
          type: array
          description: >-
            project_items_edit only. Subset of column_slugs the collaborator can
            edit.
          items:
            type: string
        filter:
          type: object
          description: The filter the item snapshot was resolved from (informational).
          properties:
            ids:
              type: array
              items:
                type: integer
            columns:
              type: array
              items:
                type: object
        header_fields:
          type: array
          description: >-
            purchase_order_edit only. PO header fields the collaborator can
            edit; `attachments` lets them upload documents and remove the ones
            they uploaded.
          items:
            type: string
            enum:
              - name
              - notes
              - supplier_contact_name
              - supplier_contact_email
              - supplier_contact_phone
              - supplier_address
              - attachments
        item_fields:
          type: array
          description: purchase_order_edit only. PO item fields the collaborator can edit.
          items:
            type: string
            enum:
              - description
              - unit_type
              - quantity
              - unit_price
        items_count:
          type: integer
          description: Shared project items, or the PO's items.
        changes_count:
          type: integer
          description: >-
            Changes made through this request — item history entries
            (project_items_edit) or PO revisions (purchase_order_edit).
        created_by:
          $ref: '#/components/schemas/collaboration_request_user'
        closed_by:
          $ref: '#/components/schemas/collaboration_request_user'
        project_item_ids:
          type: array
          description: >-
            project_items_edit only, in show / create / update / close
            responses.
          items:
            type: integer
        expires_at:
          type: string
          format: date-time
          nullable: true
        closed_at:
          type: string
          format: date-time
          nullable: true
        last_accessed_at:
          type: string
          format: date-time
          nullable: true
          description: Latest access by any recipient.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
    filter:
      type: object
      properties:
        ids:
          type: array
          items:
            type: integer
        columns:
          type: array
          items:
            type: object
            required:
              - column_slug
              - operator
            properties:
              column_slug:
                type: string
              operator:
                type: string
              value: {}
              value2: {}
              values:
                type: array
                items:
                  type: string
    requestBodyCollaborationRecipients:
      type: array
      description: >-
        People to share with (max 50). A user is created for an unknown email;
        each is emailed a sign-in link to the request (single use, 7 days).
      items:
        type: object
        properties:
          email:
            type: string
          name:
            type: string
            nullable: true
            description: Only used as first/last name when the user is created.
        required:
          - email
    collaboration_subject:
      type: object
      description: >-
        What a collaboration request shares — a project (project_items_edit) or
        a purchase order (purchase_order_edit).
      properties:
        type:
          type: string
          enum:
            - project
            - purchase_order
        id:
          type: integer
          description: Workspace side only.
        name:
          type: string
          description: Project name, or the PO's name (its label when it has none).
        code:
          type: string
          nullable: true
          description: Project code, or the PO's label.
    collaboration_request_recipient:
      type: object
      properties:
        id:
          type: integer
        user:
          $ref: '#/components/schemas/collaboration_request_user'
        revoked_at:
          type: string
          format: date-time
          nullable: true
        revoked_by:
          $ref: '#/components/schemas/collaboration_request_user'
        last_accessed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    collaboration_request_user:
      type: object
      nullable: true
      properties:
        id:
          type: integer
        email:
          type: string
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.