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

# Send an attestation request

> Sends a published document to a person for acknowledgment or signature.



## OpenAPI

````yaml /api-reference/openapi.json post /attestation-requests
openapi: 3.1.0
info:
  title: ClearPolicy API
  description: >-
    Programmatic access to your organization's people, documents, and
    attestation requests.


    Each API token is limited to 60 requests per minute. Successful responses
    and `429 Too Many Requests` responses include `X-RateLimit-Limit`,
    `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
  version: 1.0.0
servers:
  - url: https://api.clearpolicy.app/api/v1
security:
  - bearerAuth: []
paths:
  /attestation-requests:
    post:
      tags:
        - Attestation Requests
      summary: Send an attestation request
      description: Sends a published document to a person for acknowledgment or signature.
      operationId: createAttestationRequest
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAttestationRequestBody'
      responses:
        '201':
          description: The created attestation request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttestationRequest'
        '400':
          description: The document has no published revision.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    CreateAttestationRequestBody:
      type: object
      required:
        - person_id
        - document_id
      properties:
        person_id:
          type: string
          description: The ULID of the person to send the request to.
        document_id:
          type: string
          description: The ULID of the document to send. Must have a published revision.
        requested_attestation_type:
          type: string
          enum:
            - acknowledgment
            - signature
          description: >-
            Override the document's default attestation type. If omitted, the
            document's default is used.
        recipient_message:
          type: string
          maxLength: 5000
          description: >-
            An optional message to include with the request. This message
            appears in the emails sent for document requests and on the
            attestation page.
    AttestationRequest:
      type: object
      required:
        - id
        - organization_id
        - document_id
        - document_revision_id
        - person_id
        - recipient_name
        - recipient_email
        - requested_attestation_type
        - source
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: The ULID of the attestation request.
        organization_id:
          type: string
          description: The ULID of the organization.
        document_id:
          type: string
          description: The ULID of the document being attested.
        document_revision_id:
          type: string
          description: The ULID of the published revision that was sent.
        person_id:
          type: string
          description: The ULID of the person the request was sent to.
        recipient_name:
          type: string
          description: The name of the recipient when the request was created.
        recipient_email:
          type: string
          format: email
          description: The email of the recipient when the request was created.
        requested_attestation_type:
          type: string
          enum:
            - acknowledgment
            - signature
          description: The attestation type for this request.
        recipient_message:
          type:
            - string
            - 'null'
          description: >-
            The message included with the request that appears in emails and on
            the attestation page, or null if none was provided.
        sent_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the request was sent, or null.
        last_reminded_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the most recent reminder was sent, or null.
        viewed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the recipient first viewed the request, or null.
        attested_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the recipient completed the attestation, or null.
        canceled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the request was canceled, or null.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the request is scheduled to expire, or null.
        expired_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the request expired, or null.
        requested_by_user_id:
          type:
            - string
            - 'null'
          description: The ULID of the user whose API token issued this request.
        source:
          type: string
          enum:
            - oauth
            - web
            - system
            - planning_center
          description: How the request was created.
        status:
          type: string
          enum:
            - created
            - sent
            - viewed
            - attested
            - canceled
            - expired
            - bounced
            - failed
            - complained
          description: >-
            The current status of the request. Delivery problem statuses
            (bounced, failed, complained) apply to pending requests whose latest
            email could not be delivered.
        created_at:
          type: string
          format: date-time
          description: When the request was created.
        updated_at:
          type: string
          format: date-time
          description: When the request was last updated.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Trial expired or subscription inactive.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              payment_url:
                type: string
                format: uri
    NotFound:
      description: The requested resource was not found in your organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Validation failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
    TooManyRequests:
      description: >-
        Rate limit exceeded. Each API token is limited to 60 requests per
        minute.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 42
        X-RateLimit-Limit:
          description: Maximum requests allowed per minute for this token.
          schema:
            type: integer
            example: 60
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit resets.
          schema:
            type: integer
            example: 1719532800
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token created in ClearPolicy API settings with the `api:use`
        scope.

````