Langdock Attachments API

The Attachments API from Langdock — 2 operation(s) for attachments.

Operations 2

POST /attachment/v1/upload Upload an attachment #
DELETE /attachment/v1/delete Delete an attachment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/langdock:langdock-attachments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

langdock-attachments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Langdock Attachments API
  version: 3.0.0
servers:
- url: https://api.langdock.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Attachments
paths:
  /attachment/v1/upload:
    post:
      operationId: uploadAttachment
      summary: Upload an attachment
      description: Upload a file that can be referenced in Agent conversations.
      tags:
      - Attachments
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The file to upload
      responses:
        '200':
          description: Successfully uploaded file
          content:
            application/json:
              schema:
                type: object
                required:
                - attachmentId
                - file
                properties:
                  attachmentId:
                    type: string
                    format: uuid
                    description: Unique identifier for the uploaded attachment
                    example: 550e8400-e29b-41d4-a716-446655440000
                  file:
                    type: object
                    required:
                    - name
                    - mimeType
                    - sizeInBytes
                    properties:
                      name:
                        type: string
                        description: Original filename
                        example: example.pdf
                      mimeType:
                        type: string
                        description: MIME type of the file
                        example: application/pdf
                      sizeInBytes:
                        type: integer
                        description: Size of the file in bytes
                        example: 1234567
              example:
                attachmentId: 550e8400-e29b-41d4-a716-446655440000
                file:
                  name: example.pdf
                  mimeType: application/pdf
                  sizeInBytes: 1234567
        '400':
          description: Invalid upload request or file validation failed
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  additionalProperties: false
                  required:
                  - message
                  - code
                  properties:
                    message:
                      type: string
                      description: The reason the file failed validation
                      example: The file "example.pdf" is declared as a PDF but its content does not start with the expected PDF header.
                    code:
                      type: string
                      enum:
                      - BAD_REQUEST
                - type: object
                  additionalProperties: false
                  required:
                  - error
                  properties:
                    error:
                      type: string
                      example: No file provided
                - type: object
                  additionalProperties: false
                  required:
                  - message
                  properties:
                    message:
                      type: string
                      example: File name or mime type not found
              examples:
                fileValidation:
                  summary: File validation failed
                  value:
                    message: The file "example.pdf" is declared as a PDF but its content does not start with the expected PDF header.
                    code: BAD_REQUEST
                missingFile:
                  summary: No file provided
                  value:
                    error: No file provided
                missingMetadata:
                  summary: File metadata missing
                  value:
                    message: File name or mime type not found
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    example: The provided API key is invalid.
              example:
                message: The provided API key is invalid.
        '403':
          description: API key does not have the required scope
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    example: Insufficient API key permissions.
                  error:
                    type: string
                    example: INSUFFICIENT_SCOPES
                  details:
                    type: object
                    required:
                    - required
                    - missing
                    properties:
                      required:
                        type: array
                        items:
                          type: string
                          example: KNOWLEDGE_FOLDER_API
                      missing:
                        type: array
                        items:
                          type: string
                          example: KNOWLEDGE_FOLDER_API
              example:
                message: Insufficient API key permissions.
                error: INSUFFICIENT_SCOPES
                details:
                  required:
                  - KNOWLEDGE_FOLDER_API
                  missing:
                  - KNOWLEDGE_FOLDER_API
        '406':
          description: File type not allowed
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    description: The reason the file type was blocked
                    example: File type not allowed. Detected executable content.
              example:
                message: File type not allowed. Detected executable content.
        '413':
          description: File exceeds the size limit
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    description: The file size limit that was exceeded
                    example: File size exceeds the limit. Max size for this file type is 256MB
              example:
                message: File size exceeds the limit. Max size for this file type is 256MB
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    example: You have exceeded the maximum number of requests per minute (500)
              example:
                message: You have exceeded the maximum number of requests per minute (500)
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                    example: Internal server error
              example:
                message: Internal server error
  /attachment/v1/delete:
    delete:
      operationId: deleteAttachment
      summary: Delete an attachment
      description: Soft-deletes an attachment by ID. The attachment must be created by the key owner or belong to a Knowledge base shared with the API key.
      tags:
      - Attachments
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - attachmentId
              properties:
                attachmentId:
                  type: string
                  format: uuid
                  description: The ID of the attachment to delete
      responses:
        '200':
          description: Attachment deleted successfully
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - message
                - attachmentId
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Attachment deleted successfully
                  attachmentId:
                    type: string
                    format: uuid
                    description: The ID of the deleted attachment
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: array
                    items: {}
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '403':
          description: API key does not have access to this attachment
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Attachment not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"
x-provenance:
  method: harvested
  publisher: Langdock
  source: https://docs.langdock.com/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)