Sources
Create a source
Sources
Create a source
This endpoint creates a source
POST
/
v1
/
projects
/
{projectID}
/
sources
curl --request POST \
--url https://dashboard.getconvoy.io/api/v1/projects/{projectID}/sources \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"body_function": "<string>",
"custom_response": {
"body": "<string>",
"content_type": "<string>"
},
"header_function": "<string>",
"idempotency_keys": [
"<string>"
],
"name": "<string>",
"provider": "github",
"pub_sub": {
"amqp": {
"auth": {
"password": "<string>",
"user": "<string>"
},
"bindExchange": {
"exchange": "<string>",
"routingKey": "<string>"
},
"deadLetterExchange": "<string>",
"host": "<string>",
"port": "<string>",
"queue": "<string>",
"schema": "<string>",
"vhost": "<string>"
},
"google": {
"project_id": "<string>",
"service_account": [
123
],
"subscription_id": "<string>"
},
"kafka": {
"auth": {
"hash": "<string>",
"password": "<string>",
"tls": true,
"type": "<string>",
"username": "<string>"
},
"brokers": [
"<string>"
],
"consumer_group_id": "<string>",
"topic_name": "<string>"
},
"sqs": {
"access_key_id": "<string>",
"default_region": "<string>",
"queue_name": "<string>",
"secret_key": "<string>"
},
"type": "sqs",
"workers": 123
},
"type": "http",
"verifier": {
"api_key": {
"header_name": "<string>",
"header_value": "<string>"
},
"basic_auth": {
"password": "<string>",
"username": "<string>"
},
"hmac": {
"encoding": "base64",
"hash": "<string>",
"header": "<string>",
"secret": "<string>"
},
"type": "noop"
}
}'
{
"message": "<string>",
"status": true,
"data": {
"body_function": "<string>",
"created_at": "<string>",
"custom_response": {
"body": "<string>",
"content_type": "<string>"
},
"deleted_at": "<string>",
"forward_headers": [
"<string>"
],
"header_function": "<string>",
"idempotency_keys": [
"<string>"
],
"is_disabled": true,
"mask_id": "<string>",
"name": "<string>",
"project_id": "<string>",
"provider": "github",
"provider_config": {
"twitter": {
"crc_verified_at": "<string>"
}
},
"pub_sub": {
"amqp": {
"auth": {
"password": "<string>",
"user": "<string>"
},
"bindedExchange": "<string>",
"deadLetterExchange": "<string>",
"host": "<string>",
"port": "<string>",
"queue": "<string>",
"routingKey": "<string>",
"schema": "<string>",
"vhost": "<string>"
},
"google": {
"project_id": "<string>",
"service_account": [
123
],
"subscription_id": "<string>"
},
"kafka": {
"auth": {
"hash": "<string>",
"password": "<string>",
"tls": true,
"type": "<string>",
"username": "<string>"
},
"brokers": [
"<string>"
],
"consumer_group_id": "<string>",
"topic_name": "<string>"
},
"sqs": {
"access_key_id": "<string>",
"default_region": "<string>",
"queue_name": "<string>",
"secret_key": "<string>"
},
"type": "sqs",
"workers": 123
},
"type": "http",
"uid": "<string>",
"updated_at": "<string>",
"url": "<string>",
"verifier": {
"api_key": {
"header_name": "<string>",
"header_value": "<string>"
},
"basic_auth": {
"password": "<string>",
"username": "<string>"
},
"hmac": {
"encoding": "base64",
"hash": "<string>",
"header": "<string>",
"secret": "<string>"
},
"type": "noop"
}
}
}
Authorizations
Path Parameters
Project ID
Body
application/json
Source Details
Function is a javascript function used to mutate the payload immediately after ingesting an event
Function is a javascript function used to mutate the headers immediately after ingesting an event
IdempotencyKeys are used to specify parts of a webhook request to uniquely identify the event in an incoming webhooks project.
Source name.
Use this to specify one of our predefined source types.
Available options:
github
, twitter
, shopify
PubSub are used to specify message broker sources for outgoing webhooks projects.
Available options:
sqs
, google
, kafka
, amqp
Source Type.
Available options:
http
, rest_api
, pub_sub
, db_change_stream
Verifiers are used to verify webhook events ingested in incoming webhooks projects. If set, type is required and match the verifier type object you choose.
Available options:
noop
, hmac
, basic_auth
, api_key
Response
201
application/json
Created
Available options:
github
, twitter
, shopify
Available options:
sqs
, google
, kafka
, amqp
Available options:
http
, rest_api
, pub_sub
, db_change_stream
Available options:
noop
, hmac
, basic_auth
, api_key
Was this page helpful?
curl --request POST \
--url https://dashboard.getconvoy.io/api/v1/projects/{projectID}/sources \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"body_function": "<string>",
"custom_response": {
"body": "<string>",
"content_type": "<string>"
},
"header_function": "<string>",
"idempotency_keys": [
"<string>"
],
"name": "<string>",
"provider": "github",
"pub_sub": {
"amqp": {
"auth": {
"password": "<string>",
"user": "<string>"
},
"bindExchange": {
"exchange": "<string>",
"routingKey": "<string>"
},
"deadLetterExchange": "<string>",
"host": "<string>",
"port": "<string>",
"queue": "<string>",
"schema": "<string>",
"vhost": "<string>"
},
"google": {
"project_id": "<string>",
"service_account": [
123
],
"subscription_id": "<string>"
},
"kafka": {
"auth": {
"hash": "<string>",
"password": "<string>",
"tls": true,
"type": "<string>",
"username": "<string>"
},
"brokers": [
"<string>"
],
"consumer_group_id": "<string>",
"topic_name": "<string>"
},
"sqs": {
"access_key_id": "<string>",
"default_region": "<string>",
"queue_name": "<string>",
"secret_key": "<string>"
},
"type": "sqs",
"workers": 123
},
"type": "http",
"verifier": {
"api_key": {
"header_name": "<string>",
"header_value": "<string>"
},
"basic_auth": {
"password": "<string>",
"username": "<string>"
},
"hmac": {
"encoding": "base64",
"hash": "<string>",
"header": "<string>",
"secret": "<string>"
},
"type": "noop"
}
}'
{
"message": "<string>",
"status": true,
"data": {
"body_function": "<string>",
"created_at": "<string>",
"custom_response": {
"body": "<string>",
"content_type": "<string>"
},
"deleted_at": "<string>",
"forward_headers": [
"<string>"
],
"header_function": "<string>",
"idempotency_keys": [
"<string>"
],
"is_disabled": true,
"mask_id": "<string>",
"name": "<string>",
"project_id": "<string>",
"provider": "github",
"provider_config": {
"twitter": {
"crc_verified_at": "<string>"
}
},
"pub_sub": {
"amqp": {
"auth": {
"password": "<string>",
"user": "<string>"
},
"bindedExchange": "<string>",
"deadLetterExchange": "<string>",
"host": "<string>",
"port": "<string>",
"queue": "<string>",
"routingKey": "<string>",
"schema": "<string>",
"vhost": "<string>"
},
"google": {
"project_id": "<string>",
"service_account": [
123
],
"subscription_id": "<string>"
},
"kafka": {
"auth": {
"hash": "<string>",
"password": "<string>",
"tls": true,
"type": "<string>",
"username": "<string>"
},
"brokers": [
"<string>"
],
"consumer_group_id": "<string>",
"topic_name": "<string>"
},
"sqs": {
"access_key_id": "<string>",
"default_region": "<string>",
"queue_name": "<string>",
"secret_key": "<string>"
},
"type": "sqs",
"workers": 123
},
"type": "http",
"uid": "<string>",
"updated_at": "<string>",
"url": "<string>",
"verifier": {
"api_key": {
"header_name": "<string>",
"header_value": "<string>"
},
"basic_auth": {
"password": "<string>",
"username": "<string>"
},
"hmac": {
"encoding": "base64",
"hash": "<string>",
"header": "<string>",
"secret": "<string>"
},
"type": "noop"
}
}
}