API Reference
The reference below covers every endpoint in the Quotes API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.
/api/v1/quotesAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Query Parameters
DRAFT, SENT, ACCEPTED or DECLINED.
Value in
- "DRAFT"
- "SENT"
- "ACCEPTED"
- "DECLINED"
Only quotes on this deal.
Only quotes for this contact.
Only quotes for this company.
Only quotes with a line on this product.
Title text, or the quote number (12 or #12).
Only records updated at or after this moment.
date-time1 <= value <= 1000100The nextCursor from the previous page.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/quotes"{ "quotes": [ { "id": "string", "number": 0, "title": "string", "status": "DRAFT", "total": 0, "validUntil": "2019-08-24T14:15:22Z", "notes": "string", "deal": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "lineItems": [ { "id": "string", "name": "string", "offering": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "quantity": 0, "unitPrice": 0, "total": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "nextCursor": "string"}{ "error": "status must be one of: DRAFT, SENT, ACCEPTED, DECLINED."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: read:quotes."}{ "error": "Rate limit exceeded."}/api/v1/quotesAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/quotes" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "lineItems": [ { "name": "string", "quantity": 0, "unitPrice": 0 } ] }'{ "quote": { "id": "string", "number": 0, "title": "string", "status": "DRAFT", "total": 0, "validUntil": "2019-08-24T14:15:22Z", "notes": "string", "deal": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "lineItems": [ { "id": "string", "name": "string", "offering": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "quantity": 0, "unitPrice": 0, "total": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "error": "Add at least one line item to the quote."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:quotes."}{ "error": "Deal not found."}{ "error": "Rate limit exceeded."}/api/v1/quotes/{id}Authorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Path Parameters
The agentlyleads ID.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/quotes/string"{ "quote": { "id": "string", "number": 0, "title": "string", "status": "DRAFT", "total": 0, "validUntil": "2019-08-24T14:15:22Z", "notes": "string", "deal": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "lineItems": [ { "id": "string", "name": "string", "offering": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "quantity": 0, "unitPrice": 0, "total": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: read:quotes."}{ "error": "Quote not found."}{ "error": "Rate limit exceeded."}/api/v1/quotes/{id}/statusAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Path Parameters
The agentlyleads ID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/quotes/string/status" \ -H "Content-Type: application/json" \ -d '{ "status": "DRAFT" }'{ "quote": { "id": "string", "number": 0, "title": "string", "status": "DRAFT", "total": 0, "validUntil": "2019-08-24T14:15:22Z", "notes": "string", "deal": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "lineItems": [ { "id": "string", "name": "string", "offering": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "quantity": 0, "unitPrice": 0, "total": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "error": "status must be one of: DRAFT, SENT, ACCEPTED, DECLINED."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:quotes."}{ "error": "Quote not found."}{ "error": "Rate limit exceeded."}