c1k.me Import and export API

Chunked link import with validation receipts, and streamed exports of links and analytics.

GitHub OpenAPI

Operations 4

POST /imports/validate Check one import chunk without writing anything #
POST /imports/apply Create the rows of a validated chunk #
GET /exports/analytics Stream retained analytics as CSV or versioned JSON #

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/c1k-me:c1k-me-import-and-export-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

c1k-me-import-and-export-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: C1K REST Import and export API
  version: 1.0.0
  summary: Organization-scoped short links, analytics, import and export, members and a change feed for c1k.me.
  description: 'Every path is relative to one organization: `https://c1k.me/api/v1/orgs/{org_id}`.

    A key binds to one organization; anything outside it answers 404.


    **Authentication.** `Authorization: Bearer c1k_rest_...` with a REST key from the

    Integrations page. Keys in a URL, query or cookie are refused, and browser sessions

    do not authenticate API calls. An operation outside the key''s scopes answers 403.


    **Format.** UTF-8 JSON, bodies up to 65,536 bytes and 16 levels deep. Responses carry

    `data` and `meta`; errors carry `error` with a stable `code`. Times are RFC 3339 UTC.


    **Retries.** Creates, bulk changes and import apply accept `Idempotency-Key`;

    edits and deletions need `If-Match`.


    **Rate limits**: 60 requests a minute per key, 300 per organization and

    10 mutations per key. A 429 carries Retry-After.


    **AI assistants** use `https://c1k.me/mcp/{org_id}`; see https://c1k.me/developers/mcp.'
  contact:
    name: C1K developers
    url: https://c1k.me/developers
  license:
    name: Proprietary. All rights reserved.
    identifier: LicenseRef-C1K-Proprietary
servers:
- url: https://c1k.me/api/v1/orgs/{org_id}
  variables:
    org_id:
      default: org_REPLACEWITHYOURID0
      description: The organization ID shown on the Integrations page.
security:
- bearerKey: []
tags:
- name: Import and export
  description: Chunked link import with validation receipts, and streamed exports of links and analytics.
paths:
  /imports/validate:
    post:
      tags:
      - Import and export
      operationId: validateImport
      summary: Check one import chunk without writing anything
      description: Requires links:write. At most 25 rows and 65,536 bytes. Returns every row as ok or with its error, and a receipt valid for ten minutes that is bound to the organization, the caller and the SHA-256 of the rows. Fields other than the listed ones, including password, fail their row.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - rows
              properties:
                rows:
                  $ref: '#/components/schemas/ImportRows'
            example:
              rows:
              - row: 1
                destination_url: https://venture.example/spring
                slug: spring26
                tags:
                - campaign
              - row: 2
                destination_url: https://venture.example/summer
                title: Summer offer
      responses:
        '200':
          description: Row results and the receipt.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - properties:
                    data:
                      type: object
                      properties:
                        rows:
                          type: array
                          items:
                            type: object
                        valid:
                          type: integer
                        invalid:
                          type: integer
                        receipt:
                          type: string
                        receipt_expires_at:
                          type: string
                          format: date-time
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
  /imports/apply:
    post:
      tags:
      - Import and export
      operationId: applyImport
      summary: Create the rows of a validated chunk
      description: Requires links:write and an Idempotency-Key. Send the validated rows unchanged with their receipt. Each row is created in its own transaction with authorization, quota, capacity and slug checked again; existing links are never changed. A retry with the same key returns the first result. An expired or mismatched receipt answers 409; validate the chunk again.
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - rows
              - receipt
              properties:
                rows:
                  $ref: '#/components/schemas/ImportRows'
                receipt:
                  type: string
                  description: From the validate response of exactly these rows.
            example:
              rows:
              - row: 1
                destination_url: https://venture.example/spring
                slug: spring26
                tags:
                - campaign
              receipt: eyJ2IjoxLCJvcmciOiJvcmdfLi4uIn0.SIGNATURE
      responses:
        '200':
          description: Created and failed rows by row number.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - properties:
                    data:
                      type: object
                      properties:
                        rows:
                          type: array
                          items:
                            type: object
                        created:
                          type: integer
                        failed:
                          type: integer
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
  /exports/links:
    get:
      tags:
      - Import and export
      operationId: exportLinks
      summary: Stream the link configuration as CSV or versioned JSON
      description: Requires exports:read. Read in batches and streamed; no copy stays on the server and no password material is included. CSV cells that begin with =, +, -, @, a tab or a carriage return get one leading apostrophe, removed again on import. The last CSV record is "#end" with the record count.
      parameters:
      - $ref: '#/components/parameters/ExportFormat'
      responses:
        '200':
          description: The export as a download named in Content-Disposition.
          headers:
            Content-Disposition:
              schema:
                type: string
          content:
            text/csv:
              schema:
                type: string
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
  /exports/analytics:
    get:
      tags:
      - Import and export
      operationId: exportAnalytics
      summary: Stream retained analytics as CSV or versioned JSON
      description: Requires exports:read and analytics:read. Daily totals, per-link days, dimension buckets, lifetime totals, collection gaps and coverage notes, streamed.
      parameters:
      - $ref: '#/components/parameters/ExportFormat'
      responses:
        '200':
          description: The export as a download named in Content-Disposition.
          headers:
            Content-Disposition:
              schema:
                type: string
          content:
            text/csv:
              schema:
                type: string
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Error envelope with a stable code.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_input
              message: Some fields are not valid.
              fields:
              - field: colour
                code: unknown_field
                message: This field is not accepted here.
              request_id: req_8Kd2PqWz5xRt1LmN3a
    RateLimited:
      description: Too many requests. Wait the number of seconds in Retry-After.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthenticated:
      description: Missing, invalid, expired or revoked key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: unauthenticated
              message: A valid API key is required in the Authorization header as Bearer.
              request_id: req_8Kd2PqWz5xRt1LmN3a
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: 16 to 128 visible ASCII characters, unique per change. A retry within 24 hours returns the original result; a changed payload answers 409. At most 20 live keys per organization.
      schema:
        type: string
        minLength: 16
        maxLength: 128
      example: launch26-20260911-0001
    ExportFormat:
      name: format
      in: query
      description: csv (the default) or json.
      schema:
        type: string
        enum:
        - csv
        - json
        default: csv
  schemas:
    ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - request_id
          properties:
            code:
              type: string
              enum:
              - invalid_input
              - unauthenticated
              - forbidden
              - not_found
              - conflict
              - version_conflict
              - quota_exceeded
              - reserved_limit_reached
              - active_limit_reached
              - rate_limited
              - storage_unavailable
              - cursor_expired
              - malformed_json
              - payload_too_large
              - unsupported_media_type
              - method_not_allowed
              - precondition_required
              - misdirected_request
              - internal_error
            message:
              type: string
            fields:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
            request_id:
              type: string
    Envelope:
      type: object
      required:
      - data
      - meta
      properties:
        data: {}
        meta:
          type: object
          required:
          - request_id
          properties:
            request_id:
              type: string
            idempotent_replay:
              type: boolean
    ImportRows:
      type: array
      minItems: 1
      maxItems: 25
      items:
        type: object
        required:
        - row
        - destination_url
        properties:
          row:
            type: integer
            minimum: 1
            maximum: 1000000
            description: Number of the row in the file; results use it.
          destination_url:
            type: string
            format: uri
          slug:
            type: string
            pattern: ^[A-Za-z0-9_-]{3,48}$
          title:
            type: string
            maxLength: 120
          tags:
            type: array
            maxItems: 5
            items:
              type: string
              minLength: 1
              maxLength: 24
          campaign:
            type: string
            maxLength: 64
          starts_at:
            type: string
            format: date-time
          expires_at:
            type: string
            format: date-time
  securitySchemes:
    bearerKey:
      type: http
      scheme: bearer
      description: A REST key (c1k_rest_...) from the Integrations page.