POST /api/v2/storefront/inventory-sources
Creates an inventory source and registers its backing agent. Only external AGENT sources are created here — MANAGED_SALES_AGENT, LINKED_STOREFRONT, and MODULAR_SOURCE rows are created through their own provisioning and linking flows.
Request
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Display name (1–255 chars) |
sourceId | string | No | Storefront-scoped ID (1–255 chars). Defaults to a slugified name |
executionType | enum | No | Only AGENT is accepted here. Default AGENT |
type | enum | Yes (for AGENT) | SALES, SIGNAL, CREATIVE, or OUTCOME |
endpointUrl | string (uri) | Yes (for AGENT) | Agent endpoint URL (max 2048) |
protocol | enum | Yes (for AGENT) | MCP or A2A |
authenticationType | enum | Yes (for AGENT) | API_KEY, JWT, BASIC_AUTH, NO_AUTH, or OAUTH |
auth | object | Conditional | Required for API_KEY, JWT, and BASIC_AUTH; omit for OAUTH and NO_AUTH. API-key shape: { type: "bearer"|"apikey"|"api_key", token }. Basic shape: { type: "basic", username, password }. JWT shape: { type: "jwt", privateKey, issuer, subject, keyId, scope, tokenEndpointUrl, audienceUrl, algorithm?, environment? } (algorithm is ES256 or RS256) |
description | string | No | Agent description (max 2000) |
Response
201 Created with the new InventorySourceResponse:
status: "PENDING" and auto-activates once the agent is reachable with the credential. For OAUTH agents the response includes an oauth.authorizationUrl to redirect the operator to. For NO_AUTH agents the source is ACTIVE immediately. The agent’s endpointUrl must be registered with AAO or the request is rejected.
Errors
400 VALIDATION_ERROR— missing required field,authsupplied for anOAUTH/NO_AUTHagent,authmissing forAPI_KEY/JWT, or the agent is not registered with AAO.401 UNAUTHORIZED— missing or invalid API key.
Related
Inventory source tasks
All operations
Inventory sources overview
Concepts and lifecycle
Update inventory source
Change fields or rotate auth
Storefront onboarding
End-to-end seller setup