Skip to content

Create a new component

POST
/components
curl --request POST \
--url https://api.pingram.io/components \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "componentId": "example", "name": "example", "internal": "example", "internalPage": "example", "html": "example" }'
Media type application/json
object
componentId
required
string
name
required
string
internal
string
internalPage
string
html
string
Example generated
{
"componentId": "example",
"name": "example",
"internal": "example",
"internalPage": "example",
"html": "example"
}

Successful response

Media type application/json
object
envId
required
string
componentId
required
string
name
required
string
internal
required
string
internalPage
required
string
html
required
string
createdAt
required
string
modifiedAt
required
string
referencedBy
required
Array<object>
object
notificationId
required
string
channel
required
string
Allowed values: EMAIL INAPP_WEB SMS CALL PUSH WEB_PUSH SLACK
templateId
required
string
channel
required
string
Allowed values: EMAIL
Example
{
"referencedBy": [
{
"channel": "EMAIL"
}
],
"channel": "EMAIL"
}

Bad Request - validation errors, invalid input

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

Unauthorized

Payment Required - usage limits exceeded

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

Internal Server Error

Bad Gateway - provider error

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}