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

# Create upload

> Starts an upload of a local file. PUT the bytes to the returned `upload.url` with `upload.headers` within 15 minutes, then call Complete upload.

Requires the `publish` scope.



## OpenAPI

````yaml /openapi.json post /media/uploads
openapi: 3.1.0
info:
  title: Autoadify API
  version: 1.0.0
  description: Schedule and publish social posts, manage your media library and more.
servers:
  - url: https://api.autoadify.com/v1
security:
  - apiKey: []
tags:
  - name: Account
    description: The API key making the request.
  - name: Channels
    description: Connected social accounts.
  - name: Posts
    description: Schedule, publish and manage posts.
  - name: Media
    description: The media library.
paths:
  /media/uploads:
    post:
      tags:
        - Media
      summary: Create upload
      description: >-
        Starts an upload of a local file. PUT the bytes to the returned
        `upload.url` with `upload.headers` within 15 minutes, then call Complete
        upload.


        Requires the `publish` scope.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUploadRequest'
      responses:
        '201':
          description: A pending media item and its upload URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaUpload'
        '401':
          description: Missing, invalid, expired or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the scope this endpoint needs (`forbidden_scope`), or
            the plan has no API access (`plan_required`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Storage full (`limit_reached`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unsupported type or too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit (`rate_limited`) or monthly quota (`quota_exceeded`)
            reached. `details.resetsAt` says when to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateUploadRequest:
      type: object
      properties:
        fileName:
          type: string
          minLength: 1
          maxLength: 255
        mimeType:
          type: string
          description: e.g. image/jpeg, image/png, video/mp4.
        fileSize:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
          description: Exact size in bytes; the upload is rejected if it differs.
        altText:
          type: string
          maxLength: 1000
      required:
        - fileName
        - mimeType
        - fileSize
    MediaUpload:
      type: object
      properties:
        media:
          $ref: '#/components/schemas/Media'
        upload:
          type: object
          properties:
            method:
              type: string
              const: PUT
            url:
              type: string
              description: One-time upload URL.
            headers:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
              description: Send exactly these headers with the PUT.
            expiresAt:
              type: string
              format: date-time
          required:
            - method
            - url
            - headers
            - expiresAt
          additionalProperties: false
        next:
          type: string
      required:
        - media
        - upload
        - next
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden_scope
                - plan_required
                - reauth_required
                - not_found
                - validation_failed
                - limit_reached
                - duplicate_post
                - conflict
                - rate_limited
                - quota_exceeded
                - internal_error
            message:
              type: string
              description: Human-readable; safe to show to a user.
            details:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          required:
            - code
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    Media:
      type: object
      properties:
        id:
          type: string
          description: Use in mediaIds when creating a post.
        type:
          type: string
          enum:
            - image
            - gif
            - video
            - document
            - audio
        status:
          type: string
          enum:
            - pending
            - ready
            - failed
        fileName:
          type:
            - string
            - 'null'
        mimeType:
          type:
            - string
            - 'null'
        sizeBytes:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        url:
          type:
            - string
            - 'null'
        thumbnailUrl:
          type:
            - string
            - 'null'
        width:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        height:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        durationSeconds:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        altText:
          type:
            - string
            - 'null'
        description:
          description: >-
            What the file shows, from Autoadify's vision pass; null until it has
            run.
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - type
        - status
        - fileName
        - mimeType
        - sizeBytes
        - url
        - thumbnailUrl
        - width
        - height
        - durationSeconds
        - altText
        - description
        - createdAt
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from Autoadify → Settings → API & MCP, sent as
        `Authorization: Bearer aak_live_…`.

````

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