Create a source

Create a source that can be attached to a CONTEXT_SOURCE_LIST attribute on a Product (for example the universal Images attribute).

Submit as multipart/form-data. The type form field discriminates the payload carried on value: for FILE, send the file bytes as the value multipart part; for TEXT, URL, and KNOWLEDGE, send the payload as the value form field.

Take the id from the response and include it in the attribute value on a subsequent POST /v1/products or PATCH /v1/products/{productId} call. Attributes currently accept FILE sources only, and may narrow that further — the Images attribute takes PNG and JPEG — so a source created here is rejected at attach time if it does not qualify.

Body Params
string
enum
required

The kind of source being created. In every case the payload is carried on the value multipart part: FILE sends binary file bytes, the others send a string.

Allowed:
required

The source payload. Its shape depends on type: for FILE, the binary file bytes (multipart file part; pick binary in the docs UI); for TEXT, a raw text string; for URL, a publicly reachable http(s) URL; for KNOWLEDGE, a Knowledge item ID (form field; pick string).

Responses

401

Unauthorized access to the workspace.

403

Product IQ is not enabled for this workspace.

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json