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-requests— Create a new purchase requestGET
/api/purchase-requests/:id— Get request statusGET
/api/cards/:id— Get virtual card detailsExample: 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"
}'