Premier Letters Agent API

The Agent API from Premier Letters — 2 operation(s) for agent.

GitHub OpenAPI

Operations 2

POST /api/v1/agent/connect Ask the account owner for an API key (no key needed) #
GET /api/v1/agent/connect/{id} Poll a connect request; returns the API key exactly once #

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/premierletters-com:premierletters-com-agent-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

premierletters-com-agent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Premierletters Com Agent API
  version: 1.0.0
  contact:
    url: https://www.premierletters.com/developers
  description: 'Operations tagged Agent across 2 of this provider''s published API definitions: premierletters-com.json, premierletters-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.premierletters.com
security:
- bearerAuth: []
tags:
- name: Agent
paths:
  /api/v1/agent/connect:
    post:
      summary: Ask the account owner for an API key (no key needed)
      description: Emails the owner an approval link (they can sign up from it). Show them user_code, then poll GET /api/v1/agent/connect/{id}?secret= every 10-30 seconds until status is approved. Always 202 for a valid body, whether or not the email has an account.
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectRequest'
      responses:
        '202':
          description: Request created and approval email sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectStarted'
        '400':
          description: invalid_json, or validation_error (bad email, agent_name or mode)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'rate_limited: too many requests from this IP, or for this email, in the last hour'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: connect_failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Agent
      operationId: postApiV1AgentConnect
      x-operation-id-source: derived
    servers:
    - url: https://www.premierletters.com
  /api/v1/agent/connect/{id}:
    get:
      summary: Poll a connect request; returns the API key exactly once
      security: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: secret
        in: query
        required: true
        schema:
          type: string
        description: poll_secret from POST /api/v1/agent/connect
      responses:
        '200':
          description: pending | denied | expired | claimed, or approved with api_key (returned once)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectStatus'
        '404':
          description: No request matches this id and secret
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'rate_limited: polling too fast'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Agent
      operationId: getApiV1AgentConnectById
      x-operation-id-source: derived
    servers:
    - url: https://www.premierletters.com
components:
  schemas:
    ConnectStatus:
      type: object
      properties:
        status:
          type: string
          enum:
          - pending
          - approved
          - claimed
          - denied
          - expired
        api_key:
          type: string
          description: Only with status approved, and only once. Save it.
        mode:
          type: string
          enum:
          - live
          - test
    ConnectStarted:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
        poll_url:
          type: string
          format: uri
        poll_secret:
          type: string
          description: Pass as ?secret= when polling. Keep it private.
        user_code:
          type: string
          description: Short code (ABC-DEF) to show the user; the approval page repeats it
        expires_at:
          type: string
          format: date-time
        instructions:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable machine-readable code, e.g. validation_failed, insufficient_balance, test_mode
        message:
          type: string
        suggestion:
          type: string
          description: What to do next
        details: {}
      required:
      - error
      - message
    ConnectRequest:
      type: object
      required:
      - email
      - agent_name
      properties:
        email:
          type: string
          format: email
          description: The account owner's email; the approval link is sent here
        agent_name:
          type: string
          minLength: 1
          maxLength: 80
          description: Your name as the user will see it, e.g. "Claude". Letters, digits, spaces and . , ' & ( ) - _ only (no links).
        mode:
          type: string
          enum:
          - live
          - test
          default: live
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pl_live_... | pl_test_...
      description: 'API key from Settings → API keys, or from the agent connect flow. Sent as `Authorization: Bearer pl_live_...`. Live keys (pl_live_) create and charge real orders. Test keys (pl_test_) run the same validation, pricing and return-address checks but never create, charge or send anything: POST /api/v1/orders answers `{ test: true }`, order lists are empty, and balance top-ups, new-card charges and Growth record writes answer 400 test_mode. Webhook endpoints can be managed with either key.'
x-refined-from:
- premierletters-com.json
- premierletters-com-openapi.json