Skip to content

Latest commit

 

History

History
178 lines (126 loc) · 7.08 KB

ConversationApi.md

File metadata and controls

178 lines (126 loc) · 7.08 KB

Swagger\Client\ConversationApi

All URIs are relative to https://atlas.forsta.io/v1

Method HTTP request Description
conversationCreate POST /conversation/ Creates a conversation token.
conversationEdit POST /conversation/{conversation_token}/ Facilitates placing a user into a Conversation specified by its token.
conversationRead GET /conversation/{conversation_token}/ Returns information about a conversation (if the requestor is the creator).

conversationCreate

\Swagger\Client\Model\ConversationUseViewResponse conversationCreate($data)

Creates a conversation token.

Body parameters: * captcha [reCaptcha's output] -- required if not currently signed in * thread_id -- optional thread id (defaults to a random uuid4) * distribution -- optional starting distribution (defaults to empty, or self if signed in) * expires -- optional expiration datetime (defaults to 1 day from now)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: JSON Web Token
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\ConversationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$data = new \Swagger\Client\Model\ConversationCreate(); // \Swagger\Client\Model\ConversationCreate | 

try {
    $result = $apiInstance->conversationCreate($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConversationApi->conversationCreate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
data \Swagger\Client\Model\ConversationCreate

Return type

\Swagger\Client\Model\ConversationUseViewResponse

Authorization

[JSON Web Token](../../README.md#JSON Web Token)

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

conversationEdit

\Swagger\Client\Model\ConversationUseViewResponse conversationEdit($conversation_token, $data)

Facilitates placing a user into a Conversation specified by its token.

Body parameters: * first_name, last_name -- optional name used if an ephemeral user is created, defaults to "Anonymous User" * email, phone -- optional information to be used if an ephemeral user is created If the caller isn't a signed-in user, an ephemeral user is created in the creator's org (or the public org if the conversation was created anonymously) using the optional user information (the user's tag is generated from slugifying+uniquifying their full name).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: JSON Web Token
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\ConversationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$conversation_token = "conversation_token_example"; // string | 
$data = new \Swagger\Client\Model\ConversationUseViewRequest(); // \Swagger\Client\Model\ConversationUseViewRequest | 

try {
    $result = $apiInstance->conversationEdit($conversation_token, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConversationApi->conversationEdit: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
conversation_token string
data \Swagger\Client\Model\ConversationUseViewRequest

Return type

\Swagger\Client\Model\ConversationUseViewResponse

Authorization

[JSON Web Token](../../README.md#JSON Web Token)

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

conversationRead

\Swagger\Client\Model\ConversationUseViewResponse conversationRead($conversation_token)

Returns information about a conversation (if the requestor is the creator).

Returns information about a conversation (if the requestor is the creator).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: JSON Web Token
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\ConversationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$conversation_token = "conversation_token_example"; // string | 

try {
    $result = $apiInstance->conversationRead($conversation_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConversationApi->conversationRead: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
conversation_token string

Return type

\Swagger\Client\Model\ConversationUseViewResponse

Authorization

[JSON Web Token](../../README.md#JSON Web Token)

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]