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

# Upload a document

> Uploads a supporting document or MMS sample file for campaign registration and stores it at the US 10DLC registry.



## OpenAPI

````yaml openapi-sms.yaml POST /10dlc/documents
openapi: 3.0.3
info:
  title: Vobiz Messaging API
  description: >
    Send and receive SMS, MMS and RCS messages, buy messaging numbers, register
    for

    US 10DLC and toll-free, run broadcasts, manage conversations, opt-outs and
    webhooks.


    **Base URL:** `https://api.vobiz.ai/api/v1/sms`


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers.

    The account is taken from your credentials; you never put an account ID in a
    path or body.

    Field names in this API are camelCase.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://vobiz.ai
servers:
  - url: https://api.vobiz.ai/api/v1/sms
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Messages
    description: Send messages and inspect their delivery state.
  - name: Numbers
    description: >-
      Messaging-capable numbers on your account, inventory search, purchase and
      release.
  - name: Coverage
    description: Where you can send, per country.
  - name: Conversations
    description: Two-way threads between one of your numbers and a contact.
  - name: Opt-outs
    description: Numbers that must not receive messages on a channel.
  - name: Webhooks
    description: Subscriptions that deliver message and broadcast events to your server.
  - name: Broadcasts
    description: Bulk sends from an uploaded recipient list.
  - name: RCS Senders
    description: RCS sender (agent) identities and their message templates.
  - name: 10DLC Brands
    description: US 10DLC brand registration.
  - name: 10DLC Campaigns
    description: US 10DLC campaigns, toll-free verification and supporting documents.
paths:
  /10dlc/documents:
    post:
      tags:
        - 10DLC Campaigns
      summary: Upload a document
      description: >-
        Uploads a supporting document or MMS sample file for campaign
        registration and stores it at the US 10DLC registry. Send
        `multipart/form-data` with the file in a part named `document` that
        carries a filename; the file can be up to 10 MB (`413` above that). The
        response is the document record; reference its `documentId` in a
        campaign's `supportingDocuments` or `mmsSampleFiles`, and use the same
        value to download it again.
      operationId: upload-document
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - document
              properties:
                document:
                  type: string
                  format: binary
                  description: >-
                    The file to upload, as the `document` part of a
                    `multipart/form-data` body. The part must include a
                    filename; a missing part returns `400` with `multipart field
                    "document" is required`. Maximum 10 MB.
            encoding:
              document:
                contentType: application/octet-stream, image/*, application/pdf
      responses:
        '201':
          description: The document was stored at the registry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
              example:
                id: 3d2c1b0a-9e8f-4d7c-b6a5-4f3e2d1c0b9a
                accountId: MA_XXXXXXXX
                provider: primary
                documentId: 7e6d5c4b-3a2f-4e1d-9c8b-7a6f5e4d3c2b
                documentName: opt-in-screenshot.png
                contentType: image/png
                contentLength: 48213
                createdAt: '2026-10-12T10:30:00Z'
        '400':
          description: The `document` part is missing, unreadable, or has no filename.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing:
                  value:
                    error: multipart field "document" is required
                filename:
                  value:
                    error: 'invalid request: document filename is required'
                unreadable:
                  value:
                    error: cannot read document
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: The file is larger than 10 MB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: document exceeds 10MB
        '422':
          description: >-
            The US 10DLC registry declined the file. `error` carries the
            registry's description.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenDLCError'
              example:
                error: >-
                  registration provider rejected the request: file type must be
                  PDF or an image
                providerError: >-
                  registration error 400 (HTTP 400): file type must be PDF or an
                  image
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          description: The US 10DLC registry did not answer. Retry the upload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenDLCError'
              example:
                error: registration provider unavailable
                providerError: 'registration error 500 (HTTP 500): upstream timeout'
      x-codeSamples:
        - lang: typescript
          label: Node SDK
          source: >
            import { VobizClient } from "@vobiz/sdk";


            const client = new VobizClient({ apiKey: "MA_XXXXXXXX", authToken:
            "YOUR_AUTH_TOKEN" });


            import { createReadStream } from "fs";

            await client.sms.campaigns.uploadDocument({
                document: fs.createReadStream("/path/to/your/file")
            })
        - lang: python
          label: Python SDK
          source: |
            from vobiz import Vobiz

            client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")

            client.sms.campaigns.upload_document(
                document="example_document",
            )
        - lang: go
          label: Go SDK
          source: |
            import (
                "context"

                vobiz "github.com/vobiz-ai/Vobiz-Go-SDK"
                "github.com/vobiz-ai/Vobiz-Go-SDK/client"
                "github.com/vobiz-ai/Vobiz-Go-SDK/option"
                "github.com/vobiz-ai/Vobiz-Go-SDK/sms"
            )

            c := client.NewClient(
                option.WithAPIKey("MA_XXXXXXXX"),
                option.WithAuthToken("YOUR_AUTH_TOKEN"),
            )

            request := &sms.UploadDocumentRequest{
                    Document: strings.NewReader(
                        "",
                    ),
                }
            c.Sms.Campaigns.UploadDocument(
                    context.TODO(),
                    request,
                )
        - lang: java
          label: Java SDK
          source: |
            import com.vobiz.api.VobizApiClient;

            VobizApiClient client = VobizApiClient
                .builder()
                .apiKey("MA_XXXXXXXX")
                .authToken("YOUR_AUTH_TOKEN")
                .build();

            client.sms().campaigns().uploadDocument(
                null,
                UploadDocumentRequest
                    .builder()
                    .build()
            );
        - lang: ruby
          label: Ruby SDK
          source: >
            require 'vobiz'


            client = Vobiz::Client.new(api_key: 'MA_XXXXXXXX', auth_token:
            'YOUR_AUTH_TOKEN')


            client.sms.campaigns.upload_document
        - lang: csharp
          label: C# SDK
          source: >
            using Vobiz;

            using Vobiz.Sms;


            var client = new VobizApiClient("YOUR_AUTH_TOKEN", "MA_XXXXXXXX");


            await client.Sms.Campaigns.UploadDocumentAsync(new
            UploadDocumentRequest());
        - lang: php
          label: PHP SDK
          source: >
            <?php


            require 'vendor/autoload.php';


            use Vobiz\VobizClient;


            $client = new VobizClient(apiKey: 'MA_XXXXXXXX', authToken:
            'YOUR_AUTH_TOKEN');


            $client->sms->campaigns->uploadDocument(
                new UploadDocumentRequest([
                    'document' => File::createFromString("example_document", "example_document"),
                ]),
            );
components:
  schemas:
    Document:
      type: object
      description: >-
        A supporting document or MMS sample file uploaded for campaign
        registration.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Record ID (UUID) of the upload on your account. Downloads and
            campaign references use `documentId`, not this value.
          example: 3d2c1b0a-9e8f-4d7c-b6a5-4f3e2d1c0b9a
        accountId:
          type: string
          example: MA_XXXXXXXX
          description: >-
            Your Vobiz account ID (`MA_...`). Always the account whose
            credentials made the request.
        provider:
          type: string
          description: Internal routing identifier; do not rely on its value.
        documentId:
          type: string
          format: uuid
          description: >-
            The registry's document ID (UUID). Use it in `GET
            /10dlc/documents/{id}` and in a campaign's `supportingDocuments` or
            `mmsSampleFiles`.
          example: 7e6d5c4b-3a2f-4e1d-9c8b-7a6f5e4d3c2b
        documentName:
          type: string
          example: opt-in-screenshot.png
          description: Original filename of the upload. Omitted when not recorded.
        contentType:
          type: string
          example: image/png
          description: >-
            Media type of the file, for example `application/pdf` or
            `image/png`. Omitted when not recorded.
        contentLength:
          type: integer
          format: int64
          description: Size of the file in bytes.
          example: 48213
        createdAt:
          type: string
          format: date-time
          example: '2026-10-12T10:30:00Z'
          description: >-
            When the record was created on your account, in ISO 8601 (RFC 3339)
            UTC.
    Error:
      type: object
      description: >-
        The body of every error response: a flat object with one `error` string
        that explains what went wrong. Use the HTTP status code to decide how to
        handle the error, and log `error` for diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          example: 'recipient has opted out: +14155550123'
          description: >-
            Human-readable explanation of the error, for example `phoneNumber is
            required` or `recipient has opted out: +14155550123`. Branch on the
            HTTP status code rather than on this text.
    TenDLCError:
      description: >-
        Error returned when the US 10DLC registry declines or cannot process a
        request. `error` is a human-readable message you can show or log. When
        the registry answers with `400`, `404`, `409`, `422` or `429`, the same
        status is passed through with this body; `502` means the registry did
        not answer and `503` means it did not accept Vobiz's service
        credentials.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            providerError:
              type: string
              description: >-
                Opaque diagnostic string you can quote to support. Do not parse
                it.
              example: 'registration error 400 (HTTP 400): brand legalName is required'
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing or invalid credentials
    ServerError:
      description: Unexpected error. Retry with the same idempotency key where one applies.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal error
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

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