samva-dev Attachments API

Email attachment metadata and secure download URLs

Operations 4

GET /v1/attachments/{id} Get an attachment #
DELETE /v1/attachments/{id} Delete an attachment #
GET /v1/attachments List message attachments #
GET /v1/attachments/{id}/download-url Get an attachment download URL #

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/samva-dev:samva-dev-attachments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

samva-dev-attachments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Samva Attachments API
  version: 1.0.0
  description: Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.
servers:
- url: https://api.samva.dev
security: []
tags:
- name: Attachments
  description: Email attachment metadata and secure download URLs
paths:
  /v1/attachments/{id}:
    get:
      tags:
      - Attachments
      operationId: attachments.getById
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AttachmentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/AttachmentId'
                  messageId:
                    $ref: '#/components/schemas/MessageId'
                  organizationId:
                    $ref: '#/components/schemas/OrganizationId'
                  filename:
                    type: string
                  contentType:
                    type: string
                  size:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  contentId:
                    anyOf:
                    - type: string
                    - type: 'null'
                  isInline:
                    type: boolean
                  createdAt:
                    type: string
                required:
                - id
                - messageId
                - organizationId
                - filename
                - contentType
                - size
                - contentId
                - isInline
                - createdAt
                additionalProperties: false
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns metadata for a single attachment, including filename, content type, and size.
      summary: Get an attachment
      x-samva-scope: messages:read
    delete:
      tags:
      - Attachments
      operationId: attachments.remove
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AttachmentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  deletedId:
                    $ref: '#/components/schemas/AttachmentId'
                required:
                - success
                - deletedId
                additionalProperties: false
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Deletes an attachment and returns the deleted attachment's ID.
      summary: Delete an attachment
      x-samva-scope: messages:delete
  /v1/attachments:
    get:
      tags:
      - Attachments
      operationId: attachments.list
      parameters:
      - name: messageId
        in: query
        schema:
          $ref: '#/components/schemas/MessageId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: AttachmentList
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentList'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns every attachment of the given message, newest first. A message's attachments all ride that one email, so the list is never paged.
      summary: List message attachments
      x-samva-scope: messages:read
  /v1/attachments/{id}/download-url:
    get:
      tags:
      - Attachments
      operationId: attachments.downloadUrl
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AttachmentId'
        required: true
      - name: expiresIn
        in: query
        schema:
          anyOf:
          - type: number
          - type: 'null'
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  expiresAt:
                    type: string
                  attachment:
                    type: object
                    properties:
                      id:
                        $ref: '#/components/schemas/AttachmentId'
                      messageId:
                        $ref: '#/components/schemas/MessageId'
                      organizationId:
                        $ref: '#/components/schemas/OrganizationId'
                      filename:
                        type: string
                      contentType:
                        type: string
                      size:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      contentId:
                        anyOf:
                        - type: string
                        - type: 'null'
                      isInline:
                        type: boolean
                      createdAt:
                        type: string
                    required:
                    - id
                    - messageId
                    - organizationId
                    - filename
                    - contentType
                    - size
                    - contentId
                    - isInline
                    - createdAt
                    additionalProperties: false
                required:
                - url
                - expiresAt
                - attachment
                additionalProperties: false
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Generates a presigned, time-limited download URL for the attachment; expiry is configurable via the expiresIn query parameter.
      summary: Get an attachment download URL
      x-samva-scope: messages:read
components:
  schemas:
    ValidationError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ValidationError
        message:
          type: string
        fields:
          anyOf:
          - type: object
            additionalProperties:
              type: array
              items:
                type: string
          - type: 'null'
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - validation
      x-retryable: false
    AttachmentId:
      type: string
      pattern: ^att_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: AttachmentId
    MessageId:
      type: string
      pattern: ^msg_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: MessageId
    GatewayTimeoutError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - GatewayTimeoutError
        message:
          type: string
        retryAfterSeconds:
          type: number
      required:
      - _tag
      - message
      - retryAfterSeconds
      additionalProperties: false
      x-category:
      - transient
      x-retryable: true
    OrganizationId:
      type: string
      pattern: ^org_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: OrganizationId
    UnauthorizedError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - UnauthorizedError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - auth
      x-retryable: false
    ResourceNotFoundError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ResourceNotFoundError
        resource:
          type: string
        id:
          type: string
        message:
          type: string
      required:
      - _tag
      - resource
      - id
      - message
      additionalProperties: false
      x-category:
      - notFound
      x-retryable: false
    ForbiddenError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ForbiddenError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - auth
      x-retryable: false
    InternalError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - InternalError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - transient
      x-retryable: true
    AttachmentList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/AttachmentId'
              messageId:
                $ref: '#/components/schemas/MessageId'
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              filename:
                type: string
              contentType:
                type: string
              size:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              contentId:
                anyOf:
                - type: string
                - type: 'null'
              isInline:
                type: boolean
              createdAt:
                type: string
            required:
            - id
            - messageId
            - organizationId
            - filename
            - contentType
            - size
            - contentId
            - isInline
            - createdAt
            additionalProperties: false
      required:
      - items
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header