Filebase Pins API

IPFS pin management operations

GitHub OpenAPI

Operations 5

GET /pins List pin requests #
POST /pins Pin an existing CID #
GET /pins/{requestid} Get a pin request and its status #
POST /pins/{requestid} Replace a pin request #
DELETE /pins/{requestid} Remove a pin request #

Specifications

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/filebase:filebase-pins-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

filebase-pins-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Filebase IPFS Pinning Service Pins API
  version: 1.0.0
  description: 'Pin existing IPFS content in a Filebase IPFS bucket. Use a bucket-specific Bearer token generated in the Filebase console. A paid account is required. Create and replacement responses describe asynchronous work: poll the returned requestid until status is pinned or failed, keeping the source content reachable. A requestid is an opaque identifier, not a CID or UUID. IPFS content is public to anyone who has its CID; deleting a pin does not delete copies retained by other peers.


    This Filebase-specific contract adapts the official IPFS Pinning Service API specification. Filebase differs in listing defaults, duplicate handling, and replacement behavior. For file uploads, CAR import, IPNS, S3 storage, and gateway management, consult the documentation and llms.txt; those interfaces are outside this specification.'
  contact:
    name: Filebase
    email: hello@filebase.com
    url: https://filebase.com/contact/
  x-upstream:
    url: https://github.com/ipfs/pinning-services-api-spec/blob/bbfaa5896d9378c8c613f2ed18d227a7a18d2880/ipfs-pinning-service.yaml
    version: 1.0.0
    license: CC0-1.0
servers:
- url: https://api.filebase.io/v1/ipfs
  description: Filebase IPFS Pinning Service API
security:
- accessToken: []
tags:
- name: Pins
  description: Retain existing CIDs and manage pin requests in the authenticated bucket.
paths:
  /pins:
    get:
      operationId: getPins
      tags:
      - Pins
      summary: List pin requests
      description: 'Returns matching pins ordered by creation time, newest first. The default limit is 10. Without a valid status filter, Filebase excludes failed pins and returns queued, pinning, and pinned requests. Specify status=failed to find failed pins. The count is the total matching the filters before the limit is applied. For older pages, pass the final result''s created timestamp as before and retain the other filters. Timestamp boundaries are exclusive: records sharing the boundary timestamp can be skipped; this is not a snapshot or a unique cursor. Do not assume the first page is complete. Avoid simultaneous before and after filters unless intentionally selecting a time window.'
      parameters:
      - $ref: '#/components/parameters/cid'
      - $ref: '#/components/parameters/name'
      - $ref: '#/components/parameters/match'
      - $ref: '#/components/parameters/status'
      - $ref: '#/components/parameters/before'
      - $ref: '#/components/parameters/after'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/meta'
      responses:
        '200':
          description: Matching pin requests, with a total count before pagination.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinResults'
              example:
                count: 1
                results:
                - requestid: opaque-pin-request-id
                  status: queued
                  created: '2026-09-30T12:00:00Z'
                  pin:
                    cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
                    name: example.txt
                    origins: []
                    meta:
                      app: example
                  delegates: []
                  info:
                    size: '0'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: Unexpected server or intermediary error. Inspect the HTTP status and Content-Type before decoding the body. Retry transient failures with exponential backoff and jitter; check pin status before repeating a mutation.
    post:
      operationId: addPin
      tags:
      - Pins
      summary: Pin an existing CID
      description: Queues retrieval and recursive pinning of an existing CID. An omitted or empty name defaults to the CID. Submitting the same name and CID again returns the existing pin and requestid with HTTP 202; it does not create a second request. Reusing a name with a different CID returns HTTP 409. Use a distinct name or explicitly replace the existing pin. HTTP 202 does not guarantee completion; poll the returned requestid. A retry returning an existing failed pin does not restart it.
      requestBody:
        required: true
        description: The CID must already be available from IPFS peers. This endpoint does not accept file bytes or CAR uploads.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pin'
            example:
              cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
              name: example.txt
              origins: []
              meta:
                app: example
      responses:
        '202':
          description: New request accepted, or the existing pin with the same name and CID returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinStatus'
              example:
                requestid: opaque-pin-request-id
                status: queued
                created: '2026-09-30T12:00:00Z'
                pin:
                  cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
                  name: example.txt
                  origins: []
                  meta:
                    app: example
                delegates: []
                info:
                  size: '0'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        default:
          description: Unexpected server or intermediary error. Inspect the HTTP status and Content-Type before decoding the body. Retry transient failures with exponential backoff and jitter; check pin status before repeating a mutation.
  /pins/{requestid}:
    parameters:
    - name: requestid
      in: path
      required: true
      description: Opaque requestid returned by Filebase. Pass it unchanged and URL-encode it as a path segment. Do not substitute a CID or assume UUID format.
      schema:
        type: string
        minLength: 1
      example: opaque-pin-request-id
    get:
      operationId: getPinByRequestId
      tags:
      - Pins
      summary: Get a pin request and its status
      description: Look up a request in the authenticated bucket. Poll queued and pinning requests with backoff until pinned or failed. A failed pin has not been retained successfully; check source availability and contact support if needed. The info object currently reports size, not a guaranteed detailed failure reason.
      responses:
        '200':
          description: Current pin request status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinStatus'
              example:
                requestid: opaque-pin-request-id
                status: pinned
                created: '2026-09-30T12:00:00Z'
                pin:
                  cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
                  name: example.txt
                  origins: []
                  meta:
                    app: example
                delegates: []
                info:
                  size: '12'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: Unexpected server or intermediary error. Inspect the HTTP status and Content-Type before decoding the body. Retry transient failures with exponential backoff and jitter; check pin status before repeating a mutation.
    post:
      operationId: replacePinByRequestId
      tags:
      - Pins
      summary: Replace a pin request
      description: Replaces the old request with a new queued request and returns its new requestid. If name is omitted or empty, the old name is retained. Filebase responds with HTTP 200, although retrieval remains asynchronous. The old pin record is removed during replacement; do not assume its content stays pinned until the new pin completes. If continuity is required, create a separately named pin, wait for pinned, update references, then delete the old request. Poll the new requestid, not the old one.
      requestBody:
        required: true
        description: The CID must already be available from IPFS peers. This endpoint does not accept file bytes or CAR uploads.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pin'
            example:
              cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
              name: example.txt
              origins: []
              meta:
                app: example
      responses:
        '200':
          description: Replacement created; use its new requestid to poll completion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinStatus'
              example:
                requestid: opaque-replacement-request-id
                status: queued
                created: '2026-09-30T12:00:00Z'
                pin:
                  cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
                  name: example.txt
                  origins: []
                  meta:
                    app: example
                delegates: []
                info:
                  size: '0'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        default:
          description: Unexpected server or intermediary error. Inspect the HTTP status and Content-Type before decoding the body. Retry transient failures with exponential backoff and jitter; check pin status before repeating a mutation.
    delete:
      operationId: deletePinByRequestId
      tags:
      - Pins
      summary: Remove a pin request
      description: Removes this pin request from the authenticated bucket. HTTP 202 has no response body. Other pins or other peers may still retain the same CID; removal is not network-wide deletion.
      responses:
        '202':
          description: Removal accepted. Empty response body.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: Unexpected server or intermediary error. Inspect the HTTP status and Content-Type before decoding the body. Retry transient failures with exponential backoff and jitter; check pin status before repeating a mutation.
components:
  schemas:
    StatusInfo:
      type: object
      description: Filebase pin information. Size is returned as a decimal string, not a JSON number. It can be zero before content is fetched.
      properties:
        size:
          type: string
          pattern: ^[0-9]+$
          example: '12'
          description: Stored size in bytes, serialized as a string.
      additionalProperties: true
      example:
        size: '12'
    TextMatchingStrategy:
      description: 'Name matching: exact is the default; iexact ignores case; partial searches within the name; ipartial combines partial matching and case folding.'
      type: string
      default: exact
      enum:
      - exact
      - iexact
      - partial
      - ipartial
    Delegates:
      type: array
      items:
        type: string
      description: Multiaddrs of Filebase peers that can receive content over Bitswap. May be empty.
      example: []
    PinMeta:
      type: object
      additionalProperties: true
      description: Optional JSON metadata. Prefer string values for interoperability. Filebase exposes S3-style x-amz-meta- keys without that prefix in responses and reserves origins for provider hints.
      example:
        app: example
    Origins:
      type: array
      items:
        type: string
      description: Optional multiaddrs of peers providing the content. Include /p2p/<peer-id>; create rejects entries without /p2p/. Use publicly reachable provider addresses. Empty if no hints were supplied.
      example: []
    PinStatus:
      description: Current state of a Filebase pin request.
      type: object
      required:
      - requestid
      - status
      - created
      - pin
      - delegates
      properties:
        requestid:
          type: string
          minLength: 1
          description: Opaque request identifier used for status, replacement, and deletion. It is not a CID or UUID.
          example: opaque-pin-request-id
        status:
          $ref: '#/components/schemas/Status'
        created:
          description: Immutable timestamp indicating when a pin request entered a pinning service; can be used for filtering results and pagination
          type: string
          format: date-time
          example: '2020-07-27T17:32:28.276Z'
        pin:
          $ref: '#/components/schemas/Pin'
        delegates:
          $ref: '#/components/schemas/Delegates'
        info:
          $ref: '#/components/schemas/StatusInfo'
      example:
        requestid: opaque-pin-request-id
        status: queued
        created: '2026-09-30T12:00:00Z'
        pin:
          cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
          name: example.txt
          origins: []
          meta:
            app: example
        delegates: []
        info:
          size: '0'
    PinResults:
      type: object
      description: A page of pins and the total number matching the current filters.
      required:
      - count
      - results
      properties:
        count:
          type: integer
          minimum: 0
          description: Total matching pins before applying limit.
        results:
          type: array
          items:
            $ref: '#/components/schemas/PinStatus'
          description: Newest requests first; may be empty.
    Status:
      description: 'queued: waiting for retrieval; pinning: retrieving content; pinned: retained successfully; failed: retention failed. Keep providers reachable until pinned.'
      type: string
      enum:
      - queued
      - pinning
      - pinned
      - failed
    Failure:
      type: object
      description: Structured Filebase API error. Reasons are extensible strings, not a closed enumeration.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - reason
          - details
          properties:
            reason:
              type: string
              description: Machine-readable error reason. Handle unknown values using the HTTP status.
              example: ERR_INVALID_TOKEN
            details:
              type: string
              description: Human-readable explanation. Do not branch on this message text.
              example: api key does not exist
    Pin:
      type: object
      required:
      - cid
      description: CID to retain, with optional name, provider hints, and metadata.
      properties:
        cid:
          type: string
          minLength: 1
          description: Valid IPFS CIDv0 or CIDv1 identifying the root DAG. Supply the raw CID, without an ipfs:// prefix, /ipfs/ path, or gateway URL.
          example: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
        name:
          type: string
          maxLength: 1024
          description: Display name. Filebase limits names to 1,024 UTF-8 bytes (which may be fewer than 1,024 characters). Defaults to the CID on create or to the old name on replacement. Creation conflicts on the same name with a different CID.
          example: example.txt
        origins:
          $ref: '#/components/schemas/Origins'
        meta:
          $ref: '#/components/schemas/PinMeta'
      example:
        cid: bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
        name: example.txt
        origins: []
        meta:
          app: example
  responses:
    UnprocessableEntity:
      description: The supplied fields could not be saved. Correct invalid values before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            UNPROCESSABLE_ENTITY:
              summary: UNPROCESSABLE_ENTITY
              description: Check field types and the UTF-8 byte length of the name.
              value:
                error:
                  reason: UNPROCESSABLE_ENTITY
                  details: Invalid or missing parameters
    BadRequest:
      description: Invalid input. Correct the CID, JSON body, or provider hints before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            MISSING_CID:
              summary: MISSING_CID
              description: Include a raw CID in the JSON body.
              value:
                error:
                  reason: MISSING_CID
                  details: CID is Missing / Request is Malformed
            INVALID_CID:
              summary: INVALID_CID
              description: Use a valid CID rather than a URL or path.
              value:
                error:
                  reason: INVALID_CID
                  details: CID is Invalid
            BAD_REQUEST:
              summary: BAD_REQUEST
              description: Supply multiaddrs containing /p2p/<peer-id>.
              value:
                error:
                  reason: BAD_REQUEST
                  details: 'Invalid Origin: invalid-origin'
    NotFound:
      description: The request does not exist in the authenticated bucket. Verify the requestid and bucket token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            NOT_FOUND:
              summary: NOT_FOUND
              description: Use the requestid returned by Filebase; replacement returns a new requestid.
              value:
                error:
                  reason: NOT_FOUND
                  details: The specified resource was not found
    Conflict:
      description: A pin with this name already refers to another CID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            CONFLICT:
              summary: CONFLICT
              description: Choose another name or replace the existing pin deliberately.
              value:
                error:
                  reason: CONFLICT
                  details: Duplicate Name
    Forbidden:
      description: The account or its usage limits prevent this operation. Resolve the restriction before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            FORBIDDEN:
              summary: FORBIDDEN
              description: Review current plans at https://filebase.com/pricing/ or contact support for account access issues.
              value:
                error:
                  reason: FORBIDDEN
                  details: The Pinning Service API requires a paid account
            PIN_LIMIT_EXCEEDED:
              summary: PIN_LIMIT_EXCEEDED
              description: Review usage and limits; remove unneeded pins or change plans before retrying.
              value:
                error:
                  reason: PIN_LIMIT_EXCEEDED
                  details: IPFS pin limit exceeded
    Unauthorized:
      description: Missing or invalid bucket credentials. Regenerate a token for the intended IPFS bucket and retry with Bearer authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          examples:
            ERR_INVALID_TOKEN:
              summary: ERR_INVALID_TOKEN
              description: Check or regenerate the bucket token; do not use S3 keys as a Bearer token.
              value:
                error:
                  reason: ERR_INVALID_TOKEN
                  details: api key does not exist
            ERR_INVALID_BUCKET:
              summary: ERR_INVALID_BUCKET
              description: Select an existing bucket belonging to the token account.
              value:
                error:
                  reason: ERR_INVALID_BUCKET
                  details: bucket not found
            ERR_INVALID_BUCKET_TYPE:
              summary: ERR_INVALID_BUCKET_TYPE
              description: Generate a token for an IPFS bucket.
              value:
                error:
                  reason: ERR_INVALID_BUCKET_TYPE
                  details: bucket must be of type IPFS
  parameters:
    after:
      name: after
      in: query
      description: Only pins created strictly after this RFC 3339 timestamp. Results remain ordered newest first.
      schema:
        type: string
        format: date-time
      example: '2026-09-30T12:00:00Z'
    name:
      name: name
      in: query
      description: Filter by name, using the match strategy.
      schema:
        type: string
      example: example.txt
    limit:
      name: limit
      in: query
      description: Maximum records requested for this page. Defaults to 10. Use a positive integer and bounded page sizes. No upstream 1,000-record maximum is promised by this Filebase contract.
      schema:
        type: integer
        minimum: 1
        default: 10
      example: 10
    before:
      name: before
      in: query
      description: Only pins created strictly before this RFC 3339 timestamp. Use the last created timestamp from a page to request older records; equal timestamps are excluded.
      schema:
        type: string
        format: date-time
      example: '2026-09-30T12:00:00Z'
    meta:
      name: meta
      in: query
      description: URL-encoded JSON object with one metadata key/value pair. Filebase only evaluates the first pair and looks up its S3-style x-amz-meta- key. Supply the key without that prefix; this is not an AND filter across multiple pairs.
      content:
        application/json:
          schema:
            type: object
            minProperties: 1
            maxProperties: 1
            additionalProperties: true
          example:
            app: example
    cid:
      name: cid
      in: query
      description: Comma-separated CIDs. Only the first 10 are used; send at most 10 per request.
      style: form
      explode: false
      schema:
        type: array
        minItems: 1
        maxItems: 10
        items:
          type: string
      example:
      - bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
    status:
      name: status
      in: query
      description: Comma-separated statuses. Omitted or entirely unrecognized values exclude failed pins rather than defaulting to pinned only. Include failed explicitly to list failures.
      style: form
      explode: false
      schema:
        type: array
        minItems: 1
        items:
          $ref: '#/components/schemas/Status'
      example:
      - queued
      - pinning
      - pinned
      - failed
    match:
      name: match
      in: query
      description: Matching strategy applied when name is present. Defaults to exact.
      schema:
        $ref: '#/components/schemas/TextMatchingStrategy'
      example: exact
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: 'Bucket-specific IPFS access token from https://console.filebase.com/keys. Send Authorization: Bearer <bucket-access-token>. The bucket must be an IPFS bucket on a paid account. This is not an S3 access-key pair or the account-derived Platform API credential.'
externalDocs:
  description: Filebase pinning documentation
  url: https://filebase.com/docs/ipfs/pinning-service-api
x-provenance:
  method: harvested
  publisher: Filebase
  source: https://filebase.com/openapi.json
  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)