Bureau of Consular Affairs Write API

Write actions (require API token).

Operations 3

POST /action/package_create Create a dataset (package) #
POST /action/package_update Update a dataset (package) #
POST /action/package_delete Delete a dataset #

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/bureau-of-consular-affairs-write-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

bureau-of-consular-affairs-write-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CA Data Catalog (CKAN) Datastore Write API
  description: 'Best-effort OpenAPI 3.1 description of the Bureau of Consular Affairs (CA) Data Catalog

    API. The catalog runs on the standard CKAN platform, which exposes its functionality at

    `/api/3/action/{action_name}` using both GET and POST. CKAN actions are described in the

    CKAN Action API documentation.


    All CA Data Catalog actions are publicly readable; write actions require an `Authorization`

    header carrying a CKAN API token (obtained from the CKAN user profile).

    '
  version: '3.0'
  contact:
    name: Bureau of Consular Affairs
    url: https://cadatacatalog.state.gov/dataset/
  license:
    name: U.S. Government Work
    url: https://www.usa.gov/government-works
servers:
- url: https://cadatacatalog.state.gov/api/3
  description: CA Data Catalog CKAN Action API
tags:
- name: Write
  description: Write actions (require API token).
paths:
  /action/package_create:
    post:
      tags:
      - Write
      summary: Create a dataset (package)
      operationId: packageCreate
      security:
      - apiToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackageResult'
  /action/package_update:
    post:
      tags:
      - Write
      summary: Update a dataset (package)
      operationId: packageUpdate
      security:
      - apiToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackageResult'
  /action/package_delete:
    post:
      tags:
      - Write
      summary: Delete a dataset
      operationId: packageDelete
      security:
      - apiToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBoolean'
components:
  schemas:
    Package:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        title:
          type: string
        notes:
          type: string
        author:
          type: string
        author_email:
          type: string
        maintainer:
          type: string
        maintainer_email:
          type: string
        license_id:
          type: string
        owner_org:
          type: string
        state:
          type: string
        type:
          type: string
        metadata_created:
          type: string
          format: date-time
        metadata_modified:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              display_name:
                type: string
        groups:
          type: array
          items:
            type: object
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
        extras:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
    Resource:
      type: object
      properties:
        id:
          type: string
        package_id:
          type: string
        name:
          type: string
        description:
          type: string
        format:
          type: string
        url:
          type: string
        mimetype:
          type: string
        size:
          type: integer
        created:
          type: string
          format: date-time
        last_modified:
          type: string
          format: date-time
        datastore_active:
          type: boolean
        state:
          type: string
    PackageResult:
      type: object
      properties:
        help:
          type: string
        success:
          type: boolean
        result:
          $ref: '#/components/schemas/Package'
    SuccessBoolean:
      type: object
      properties:
        help:
          type: string
        success:
          type: boolean
        result:
          type: boolean
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: Authorization
      description: CKAN API token, generated from the CKAN user profile.