Documentation

Everything you need to integrate Cosign into your AI workflows.

Quick Start

1

Create an Agent

Sign in to your dashboard and create a new AI agent. Give it a name and configure spending limits.

2

Get your API Key

Navigate to your agent's settings and copy the API key. Keep it secure.

3

Submit a Purchase Request

Use the API to submit a purchase request with the merchant, amount, and description.

4

Approve the Purchase

You'll receive a notification. Approve with one tap and a virtual card is issued to your agent.

API Reference

All API requests require an X-API-Key header with your agent API key.

Authentication

X-API-Key: <your-agent-api-key>

Key Endpoints

POST/api/purchase-requestsCreate a new purchase request
GET/api/purchase-requests/:idGet request status
GET/api/cards/:idGet virtual card details

Example: Create a Purchase Request

curl -X POST https://cosign-production.up.railway.app/api/v1/purchase-requests \ -H "X-API-Key: <your-agent-api-key>" \ -H "Content-Type: application/json" \ -d '{ "merchant": { "name": "Amazon", "domain": "amazon.com", "category": "general_merchandise" }, "items": [{ "name": "Wireless keyboard", "quantity": 1, "unitPrice": 4999 }], "justification": "Office supplies restock" }'