All URIs are relative to https://approve.sh
Method | HTTP request | Description |
---|---|---|
create_prompt | POST /prompt | Sending a prompt |
get_prompt | GET /prompt/{id} | Retrieve a prompt |
get_prompt_status | GET /prompt/{id}/status | Check prompt status |
::models::Prompt create_prompt(ctx, create_prompt_request) Sending a prompt
Creates a prompt and pushes it to the user (sends via email, sms, or other supported protocols).
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context containing the authentication | nil if no authentication |
create_prompt_request | CreatePromptRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
::models::Prompt get_prompt(ctx, id, optional) Retrieve a prompt
Retrieve the prompt object with the given ID.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context containing the authentication | nil if no authentication |
id | String | The identifier for a pending or completed prompt. This is returned when you create a prompt. | |
optional | map[string]interface{} | optional parameters | nil if no parameters |
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes |
---|---|---|---|
id | String | The identifier for a pending or completed prompt. This is returned when you create a prompt. | |
long_poll | bool | If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
::models::PromptStatus get_prompt_status(id) Check prompt status
Returns whether a prompt has been completed by the user. This request does not require authentication, and so can be used client-side without sharing API credentials.
Name | Type | Description | Notes |
---|---|---|---|
id | String | The prompt identifier. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]