This tutorial is in order to restrict the Recipients of the Container that can see this specific Feature. If none is selected, this Feature will be shown to all Recipient(s) of this Container.
Botdoc P2 Container is a session with multiple secure Features inside of it, with P2 you can make a Flow automation or just a simple file "push", "pull", “DocuSign” or “External URL”.
Endpoint: https://api.botdoc.io/v1/module_container/container/
Method: POST.
Example of the body in JSON format:
{ "page_type": "p2", "callback_url": "https://link.to.your.callback.url", "display_chat": true } |
Example how to create a Container by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "page_type": "p2", "callback_url": "https://link.to.your.callback.url", "display_chat": true }" |
After the Secure Container is created, you need to create two or more Recipients of your Secure Container.
Endpoint: https://api.botdoc.io/v1/module_container/container/{container_id}/recipient/
Method: POST.
Example of the body in JSON format:
{ "first_name": "First", "last_name": "Receiver" } |
Example how to create a Recipient by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/{container_id}/recipient/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "first_name": "First", "last_name": "Receiver" } " |
Endpoint: https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/
Method: POST.
Example of the body in JSON format:
{ "interface_class": "email", //can be "email" or "sms" "value": "first_receiver@botdoc.io" } |
Example how to create a Recipient Item by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "interface_class": "email", "value": "first_receiver@botdoc.io" } " |
Example of the body in JSON format:
{ "first_name": "Second", "last_name": "Receiver" } |
Example how to create a Recipient by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/{container_id}/recipient/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "first_name": "Second", "last_name": "Receiver" } " |
Endpoint: https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/
Method: POST.
Example of the body in JSON format:
{ "interface_class": "sms", //can be "email" or "sms" "value": "000000000000" } |
Example how to create a Container by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "interface_class": "sms", "value": "000000000000" } " |
Now, you must inform the Email Message if in the previewer step the transport method was sent to Email.
Endpoint: https://api.botdoc.io/v1/module_container/container/{container_id}/email/
Method: POST.
Example of the body in JSON format:
{ "subject": "nice subject", "body": "a nice message here" } |
Example how to create an Email message by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/{container_id}/email/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "subject": "nice subject", "body": "a nice message here" }" |
Now, you must inform the SMS Message if in the previewer step, the transport method was sent to SMS.
Endpoint: https://api.botdoc.io/v1/module_container/container/{container_id}/sms/
Method: POST.
Example of the body in JSON format:
{ "body": "a nice body here" } |
Example how to create an SMS message by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/{container_id}/sms/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "body": "a nice body here" }" |
Now, you must add a feature, can be Pull, Push, DocuSign or External URL, this example is a Pull:
If you want to request file(s) FROM your receiver, you must send a Pull Feature:
Endpoint: https://api.botdoc.io/v1/module_container_pull/pull/
Method: POST.
Example of the body in JSON format:
{ "container": {container_id}, "title": "Nice Pull Title", "description": "Nice Pull Desc." } |
Example how to create a Pull Feature by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container_pull/pull/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "container": {container_id}, "title": "Nice Pull Title", "description": "Nice Pull Desc." }" |
To add a permission for the Recipient to see this Feature created, you need to Post the information below:
Endpoint: https://api.botdoc.io/v1/module_container/featurerecipientpermission/
Method: POST.
Example of the body in JSON format:
{ "feature":{feature_id}, "recipient":{recipient_id} } |
Example how to Create a Permission to a Feature and Recipient by cURL:
curl -i --request POST "https://api.botdoc.io/v1/module_container/featurerecipientpermission/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "feature":{feature_id}, "recipient":{recipient_id} }" |
To remove a permission for the Recipient to see this Feature created, you need to Delete the information below:
Endpoint: https://api.botdoc.io/v1/module_container/featurerecipientpermission/{id}/
Method: POST.
Example how to Delete a Permission to a Feature and Recipient by cURL:
curl -i \ --request DELETE "https://api.botdoc.io/v1/module_container/featurerecipientpermission/{id}"\ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" |
Now, send the Notification to the Receiver(s).
Endpoint: https://api.botdoc.io/v1/module_container/container/{container_id}/send_notification/
Method: POST.
Example how to send a notification by cURL:
curl -i \ --request POST "https://api.botdoc.io/v1/module_container/container/{container_id}/send_notification/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "" |
For more details about creating a requests you can take a look at our Botdoc API Reference on api.botdoc.io/documentation/#create-request |
The content by label feature displays related articles automatically, based on labels you choose. To edit options for this feature, select the placeholder below and tap the pencil icon.