---
title: "Get document"
url: "https://earlyaccess.developers.bynder.com/apis/text-authoring-api-1/versions/9849902d-3283-4e54-bd51-00051500650c/operations/getDocument"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/text-authoring-api-1/versions/9849902d-3283-4e54-bd51-00051500650c.md

# Get document

`GET` `/documents/{document_uuid}`

Operation ID: `getDocument`

Use this endpoint to retrieve your text content in CXUC. The `$ACCOUNT` is your assigned subdomain, or just replace the URL if you have a custom domain.

## Path parameters

- `document_uuid` (string, required) - The UUID of the document to be actioned.

## Header parameters

- `Accept` (optional) - The Accept header must be set to application/vnd.api+json
- `Authorization` (string, required) - The authorization header that is using the JWT token and the Bearer scheme.
- `Referer` (string, optional) - The referer header is required to derive the calling module for permissions functionality.

## Responses

- `200` - A DocumentContent response
- `400` - Validation Error
- `403` - Permissions Error
- `500` - Server Error

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Text Authoring API
  version: 1.0.0
servers:
  - description: The $ACCOUNT should be your assigned subdomain or replace the whole
      URL if you have a custom domain.
    url: https://$ACCOUNT.bynder.com/api/1/authoring
    variables: {}
paths:
  /documents/{document_uuid}:
    parameters: []
    get:
      deprecated: false
      description: Use this endpoint to retrieve your text content in CXUC. The
        `$ACCOUNT` is your assigned subdomain, or just replace the URL if you
        have a custom domain.
      operationId: getDocument
      parameters:
        - description: The UUID of the document to be actioned.
          in: path
          name: document_uuid
          required: true
          schema:
            contentEncoding: uuid
            type: string
          style: simple
        - description: The Accept header must be set to application/vnd.api+json
          in: header
          name: Accept
          schema:
            allOf:
              - $ref: "#/components/schemas/Accept"
              - description: The Accept header must be set to application/vnd.api+json
          style: simple
        - description: The authorization header that is using the JWT token and the Bearer
            scheme.
          in: header
          name: Authorization
          required: true
          schema:
            pattern: Bearer .+
            type: string
          style: simple
        - description: The referer header is required to derive the calling module for
            permissions functionality.
          in: header
          name: Referer
          schema:
            examples:
              - https://account.example.com/guidelines/page/d4822bae-91ac-4cec-b392-9c5c1877f718
            type: string
          style: simple
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                $ref: "#/components/schemas/DocumentContentBody"
          description: A DocumentContent response
          headers: {}
        "400":
          content:
            application/vnd.api+json:
              schema:
                $ref: "#/components/schemas/ErrorsObject"
          description: Validation Error
          headers: {}
        "403":
          content:
            application/vnd.api+json:
              examples:
                forbidden:
                  description: Example of error properties when the error is a 403 forbidden
                    response
                  summary: Forbidden error
                  value:
                    errors:
                      - code: FORBIDDEN_ERROR
                        detail: Something went wrong
                        id: req-adcaa568-7082-4cc8-9db9-9d78f1a3d95d
                        status: 403
                        title: ForbiddenError
              schema:
                allOf:
                  - $ref: "#/components/schemas/ErrorsObject"
                  - examples:
                      - errors:
                          - code: FORBIDDEN_ERROR
                            detail: Something went wrong
                            id: req-adcaa568-7082-4cc8-9db9-9d78f1a3d95d
                            status: 403
                            title: ForbiddenError
                contentMediaType: application/vnd.api+json
          description: Permissions Error
          headers: {}
        "500":
          content:
            application/vnd.api+json:
              examples:
                forbidden:
                  description: Example of error properties when the error is a 500 error response
                  summary: Unknown Error
                  value:
                    errors:
                      - code: UNKNOWN_ERROR
                        detail: Something went wrong
                        id: req-adcaa568-7082-4cc8-9db9-9d78f1a3d95d
                        status: 500
                        title: UnknownError
              schema:
                allOf:
                  - $ref: "#/components/schemas/ErrorsObject"
                  - examples:
                      - errors:
                          - code: UNKNOWN_ERROR
                            detail: Something went wrong
                            id: req-adcaa568-7082-4cc8-9db9-9d78f1a3d95d
                            status: 500
                            title: UnknownError
                contentMediaType: application/vnd.api+json
          description: Server Error
          headers: {}
      security:
        - bearerAuth: []
      summary: Get document
      tags:
        - Document
security:
  - bearerAuth: []
components:
  schemas:
    Accept:
      const: application/vnd.api+json
      title: Accept
      type: string
    DocumentContentBody:
      properties:
        data:
          $ref: "#/components/schemas/Resourcerepresentingthecontentinadocument1"
      required:
        - data
      title: DocumentContentBody
      type: object
    ErrorsObject:
      properties:
        errors:
          description: ""
          items:
            $ref: "#/components/schemas/ErrorObject"
          minItems: 1
          type: array
      required:
        - errors
      title: ErrorsObject
      type: object
    Resourcerepresentingthecontentinadocument1:
      properties:
        attributes:
          $ref: "#/components/schemas/Attributes"
        id:
          contentEncoding: uuid
          description: UUID identifier
          type: string
        type:
          const: document
          description: Resource type
          type: string
      required:
        - id
        - type
        - attributes
      title: Resourcerepresentingthecontentinadocument1
      type: object
    ErrorObject:
      properties:
        code:
          allOf:
            - $ref: "#/components/schemas/ErrorCode"
            - description: Machine readable error code
              examples:
                - VALIDATION_ERROR
        detail:
          description: Human readable error details.
          examples:
            - body/data/attributes must have required property 'html'
          type: string
        id:
          description: Unique identifier for this _instance_ of the error
          examples:
            - req-adcaa568-7082-4cc8-9db9-9d78f1a3d95d
          type: string
        meta:
          description: An object of any arbitrary data. Record<string, unknown>
        status:
          description: The HTTP Status Code
          examples:
            - "400"
            - "500"
          type: number
        title:
          description: Human readable error title.
          examples:
            - ValidationError
          type: string
      required:
        - status
        - code
        - title
        - detail
      title: ErrorObject
      type: object
    Attributes:
      properties:
        document:
          description: ProseMirror JSON Object
            (https://prosemirror.net/docs/ref/#model.Document_Structure)
          examples:
            - content:
                - content:
                    - text: Hello world.
                      type: text
                  type: paragraph
              type: doc
          type: string
        documentGroupId:
          description: The group id to which the document belongs. This is used to group
            documents together.
          examples:
            - group_id_1
          type: string
        html:
          description: HTML string
          examples:
            - <p>Hello world!</p>
          type: string
      title: Attributes
      type: object
    ErrorCode:
      description: Machine readable error code
      enum:
        - VALIDATION_ERROR
        - SERIALIZATION_ERROR
        - UNKNOWN_ERROR
        - AUTHENTICATION_ERROR
        - MISSING_ERROR
        - FORBIDDEN_ERROR
        - STORAGE_API_ERROR
      examples:
        - VALIDATION_ERROR
      title: ErrorCode
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: jwt
      scheme: bearer
      type: http
```
