NAV -image
bash php javascript

Introduction

This documentation aims to provide all the information you need to work with the Upfocus API.

If you're reading this, you're one of the first people to use it!

Feel free to email support if you have any questions, would like to request additional endpoints, etc.

Base URL

https://app.upfocus.io

Authenticating requests

This API is authenticated by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can create and manage your API tokens from your profile.

Customers

API endpoints for managing the customers of a product.

List all customers

requires authentication

Lists all existing customers of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/customers" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"[email protected]","direction":"asc","search":"similique","sort":"first_name","status":"not"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/customers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'direction' => 'asc',
            'search' => 'similique',
            'sort' => 'first_name',
            'status' => 'not',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "direction": "asc",
    "search": "similique",
    "sort": "first_name",
    "status": "not"
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

[
    {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "first_name": "First Name",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "open",
        "attributes": {
            "ltv": "",
            "plan": "Business"
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
        }
    }
]

Request   

GET api/products/{product}/customers

URL Parameters

product  string  
Product slug.

Body Parameters

email  string optional  
The value must be a valid email address.

direction  string optional  
The value must be one of asc or desc.

search  string optional  

sort  string optional  
The value must be one of email, first_name, last_name, created_at, or updated_at.

status  string optional  
The value must be one of open, very, somewhat, or not.

Create a customer

requires authentication

Create a new customer for a product.

Example request:

curl -X POST \
    "https://app.upfocus.io/api/products/slack/customers" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"[email protected]","first_name":"cupiditate","last_name":"ut","avatar_url":"http:\/\/gleason.net\/","attributes":["repellat"]}'

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.upfocus.io/api/products/slack/customers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'first_name' => 'cupiditate',
            'last_name' => 'ut',
            'avatar_url' => 'http://gleason.net/',
            'attributes' => [
                'repellat',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "first_name": "cupiditate",
    "last_name": "ut",
    "avatar_url": "http:\/\/gleason.net\/",
    "attributes": [
        "repellat"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
    "first_name": "First Name",
    "last_name": "Last Name",
    "email": "[email protected]",
    "avatar_url": null,
    "product_survey_status": "open",
    "attributes": {
        "ltv": "",
        "plan": "Business"
    },
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
    }
}

Request   

POST api/products/{product}/customers

URL Parameters

product  string  
Product slug.

Body Parameters

email  string  
The value must be a valid email address.

first_name  string optional  
The customer's first name.

last_name  string optional  
The customer's last name.

avatar_url  string optional  
Override Gravatar with custom source URL for the customer's avatar. The value must be a valid URL.

attributes  string[] optional  
Any attributes to store with the customer.

Response

Response Fields

created_at  string  
The date the customer was created.

updated_at  string  
The date the customer was last updated.

uuid  string  
The UUID for the customer.

email  string  
The customer's email address.

first_name  string  
The customer's first name.

last_name  string  
The customer's last name.

avatar_url  string  
An optional custom source URL for the customer's avatar.

product_survey_status  string  
The status of the customer's most recent product survey response.

attributes  object  
The customer's attributes as key-value pairs.

attributes.plan  string  
If the product had a 'Plan' custom attribute, this would be the key.

urls  object  
All URLs representing the customer.

urls.api  string  
The API URL for the customer.

urls.audits_api  string  
The API URL for the customer's audit log.

urls.html  string  
The URL for the customer's detail view.

urls.product_survey  string  
The customer's product survey URL.

Retrieve a customer

requires authentication

Get an existing customer of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
    "first_name": "First Name",
    "last_name": "Last Name",
    "email": "[email protected]",
    "avatar_url": null,
    "product_survey_status": "open",
    "attributes": {
        "ltv": "",
        "plan": "Business"
    },
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
    }
}

Request   

GET api/products/{product}/customers/{customer}

URL Parameters

product  string  
Product slug.

customer  string  
Customer UUID.

Response

Response Fields

created_at  string  
The date the customer was created.

updated_at  string  
The date the customer was last updated.

uuid  string  
The UUID for the customer.

email  string  
The customer's email address.

first_name  string  
The customer's first name.

last_name  string  
The customer's last name.

avatar_url  string  
An optional custom source URL for the customer's avatar.

attributes  object  
The customer's attributes as key-value pairs.

attributes.plan  string  
If the product had a 'Plan' custom attribute, this would be the key.

urls  object  
All URLs representing the customer.

urls.api  string  
The API URL for the customer.

urls.audits_api  string  
The API URL for the customer's audit log.

urls.html  string  
The URL for the customer's detail view.

urls.product_survey  string  
The customer's product survey URL.

Update a customer

requires authentication

Update an existing customer of a product.

Example request:

curl -X PUT \
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"[email protected]","first_name":"et","last_name":"qui","avatar_url":"http:\/\/www.oconner.biz\/maxime-aspernatur-corporis-enim.html","attributes":["ut"]}'

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'first_name' => 'et',
            'last_name' => 'qui',
            'avatar_url' => 'http://www.oconner.biz/maxime-aspernatur-corporis-enim.html',
            'attributes' => [
                'ut',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "first_name": "et",
    "last_name": "qui",
    "avatar_url": "http:\/\/www.oconner.biz\/maxime-aspernatur-corporis-enim.html",
    "attributes": [
        "ut"
    ]
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
    "first_name": "First Name",
    "last_name": "Last Name",
    "email": "[email protected]",
    "avatar_url": null,
    "product_survey_status": "open",
    "attributes": {
        "ltv": "",
        "plan": "Business"
    },
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
    }
}

Request   

PUT api/products/{product}/customers/{customer}

PATCH api/products/{product}/customers/{customer}

URL Parameters

product  string  
Product slug.

customer  string  
Customer UUID.

Body Parameters

email  string  
The value must be a valid email address.

first_name  string optional  
The customer's first name.

last_name  string optional  
The customer's last name.

avatar_url  string optional  
Override Gravatar with custom source URL for the customer's avatar. The value must be a valid URL.

attributes  string[] optional  
Any attributes to store with the customer.

Response

Response Fields

created_at  string  
The date the customer was created.

updated_at  string  
The date the customer was last updated.

uuid  string  
The UUID for the customer.

email  string  
The customer's email address.

first_name  string  
The customer's first name.

last_name  string  
The customer's last name.

avatar_url  string  
An optional custom source URL for the customer's avatar.

attributes  object  
The customer's attributes as key-value pairs.

attributes.plan  string  
If the product had a 'Plan' custom attribute, this would be the key.

urls  object  
All URLs representing the customer.

urls.api  string  
The API URL for the customer.

urls.audits_api  string  
The API URL for the customer's audit log.

urls.html  string  
The URL for the customer's detail view.

urls.product_survey  string  
The customer's product survey URL.

Delete a customer

requires authentication

Delete an existing customer of a product.

Example request:

curl -X DELETE \
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/products/{product}/customers/{customer}

URL Parameters

product  string  
Product slug.

customer  string  
Customer UUID.

List customer audit log

requires authentication

Get all audit log entries for a customer of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4/audits" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4/audits',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/customers/0c2b7650-c110-4e56-96d5-a65adba4d0a4/audits"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

{
    "message": "Unauthenticated."
}

Request   

GET api/products/{product}/customers/{customer}/audits

URL Parameters

product  string  
Product slug.

customer  string  
Customer UUID.

Suggestions

API endpoints for managing the suggestions of a product.

List all suggestions

requires authentication

Lists all existing suggestions of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/suggestions" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"customer":"est","search":"aliquid","limit":10,"theme":"quidem","time":"culpa","user":"[email protected]"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/suggestions',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'customer' => 'est',
            'search' => 'aliquid',
            'limit' => 10,
            'theme' => 'quidem',
            'time' => 'culpa',
            'user' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "customer": "est",
    "search": "aliquid",
    "limit": 10,
    "theme": "quidem",
    "time": "culpa",
    "user": "[email protected]"
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

[
    {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "tagged_at": "2021-05-04 11:02:52",
        "uuid": "da29df2c-7f1d-4ca2-a2c4-27267be07134",
        "content": "I really wish Slack was less distracting.",
        "source": "https:\/\/slack.com\/",
        "importance": "important",
        "urgency": "",
        "no_themes": null,
        "themes": [
            {
                "created_at": "2021-05-04T11:02:52.000000Z",
                "updated_at": "2021-05-04T11:02:52.000000Z",
                "uuid": "f247185a-950d-4496-9477-afa585fb50c3",
                "name": "Less Distracting",
                "status": "research",
                "description": null,
                "count": 1,
                "importance_score": 2,
                "urgency_score": 0,
                "stakeholders": [
                    {
                        "first_name": "First Name",
                        "last_name": "Last Name",
                        "email": "[email protected]",
                        "avatar_url": null,
                        "type": "customer",
                        "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4"
                    }
                ],
                "dev_idea_blurbs": null,
                "urls": {
                    "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3",
                    "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3\/audits",
                    "html": "https:\/\/upfocus.io\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3"
                },
                "customer_need": null,
                "importance_counts": {
                    "blocker": 0,
                    "important": 1,
                    "nice": 0,
                    "": 0
                },
                "urgency_counts": {
                    "now": 0,
                    "soon": 0,
                    "eventually": 0,
                    "": 1
                },
                "theme_value": "less distracting"
            }
        ],
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134"
        },
        "customer": {
            "created_at": "2019-08-01T00:00:00.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "first_name": "First Name",
            "last_name": "Last Name",
            "email": "[email protected]",
            "avatar_url": null,
            "product_survey_status": "open",
            "attributes": {
                "ltv": "",
                "plan": "Business"
            },
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
                "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
            }
        },
        "user": {
            "email": "[email protected]",
            "first_name": "Slack",
            "last_name": "User"
        }
    }
]

Request   

GET api/products/{product}/suggestions

URL Parameters

product  string  
Product slug.

Body Parameters

customer  string optional  
Limit results to suggestions associated with a given customer UUID.

search  string optional  
Limit results to suggestions with content matching the search string.

limit  integer optional  
Limit number of results returned. Default: 10.

theme  string optional  
Limit results to suggestions associated with a given theme UUID.

time  string optional  
Limit results to the past week, month, or year. Examples: past-3-day, past-2-month.

user  string optional  
Limit results to suggestions associated with a given user. The value must be a valid email address.

Create a suggestion

requires authentication

Create a new suggestion for a product.

The content is a required parameter and supports Markdown. To capture where the suggestion came from, the optional source parameter can be a URL or string of text.

A suggestion can be associated with a customer via the customer.uuid or customer.email parameter. The customer must already exist in the system. The importance and urgency attributes are only permitted when a suggestion is assigned to a customer.

If the suggestion came from a teammate, associate it with a user via user.email.

Example request:

curl -X POST \
    "https://app.upfocus.io/api/products/slack/suggestions" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"created_at":"2021-05-04T11:03:02+0000","content":"explicabo","source":"possimus","customer":{"uuid":"quo","email":"[email protected]"},"user":{"email":"odio"},"importance":"nice","urgency":"soon"}'

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.upfocus.io/api/products/slack/suggestions',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'created_at' => '2021-05-04T11:03:02+0000',
            'content' => 'explicabo',
            'source' => 'possimus',
            'customer' => [
                'uuid' => 'quo',
                'email' => '[email protected]',
            ],
            'user' => [
                'email' => 'odio',
            ],
            'importance' => 'nice',
            'urgency' => 'soon',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "created_at": "2021-05-04T11:03:02+0000",
    "content": "explicabo",
    "source": "possimus",
    "customer": {
        "uuid": "quo",
        "email": "[email protected]"
    },
    "user": {
        "email": "odio"
    },
    "importance": "nice",
    "urgency": "soon"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "tagged_at": "2021-05-04 11:02:52",
    "uuid": "da29df2c-7f1d-4ca2-a2c4-27267be07134",
    "content": "I really wish Slack was less distracting.",
    "source": "https:\/\/slack.com\/",
    "importance": "important",
    "urgency": "",
    "no_themes": null,
    "themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "f247185a-950d-4496-9477-afa585fb50c3",
            "name": "Less Distracting",
            "status": "research",
            "description": null,
            "count": 1,
            "importance_score": 2,
            "urgency_score": 0,
            "stakeholders": [
                {
                    "first_name": "First Name",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3"
            },
            "customer_need": null,
            "importance_counts": {
                "blocker": 0,
                "important": 1,
                "nice": 0,
                "": 0
            },
            "urgency_counts": {
                "now": 0,
                "soon": 0,
                "eventually": 0,
                "": 1
            },
            "theme_value": "less distracting"
        }
    ],
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134"
    },
    "customer": {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "first_name": "First Name",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "open",
        "attributes": {
            "ltv": "",
            "plan": "Business"
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
        }
    },
    "user": {
        "email": "[email protected]",
        "first_name": "Slack",
        "last_name": "User"
    }
}

Request   

POST api/products/{product}/suggestions

URL Parameters

product  string  
Product slug.

Body Parameters

created_at  string optional  
The date of the suggestion. Defaults to today. The value must be a valid date.

content  string  
The body of the suggestion. Markdown is supported.

source  string optional  
Where the suggestion originated. Can be a URL or text.

customer  object optional  
The customer associated with the suggestion (if it came from a customer).

customer.uuid  string optional  
The UUID for the associated customer.

customer.email  string optional  
The email address for the originating customer (if the suggestion came from a customer). Can be used instead of UUID. The value must be a valid email address.

user  object optional  
The user associated with the suggestion (if it was reported by a user).

user.email  string optional  
The email address for the associated user.

importance  string optional  
If the suggestion came from a customer, it's importance. The value must be one of nice, important, blocker, or .

urgency  string optional  
If the suggestion came from a customer, it's urgency. The value must be one of eventually, soon, now, or .

Response

Response Fields

created_at  string  
The date the suggestion was created.

updated_at  string  
The date the suggestion was last updated.

uuid  string  
The UUID for the suggestion.

content  string  
The content of the suggestion.

source  string  
Where the suggestion originated.

customer  object  
The customer associated with the suggestion (if it came from a customer).

customer.uuid  string  
The UUID for the associated customer.

user  object  
The user associated with the suggestion (if it was reported by a user).

importance  string  
If the suggestion came from a customer, its importance.

urgency  string  
If the suggestion came from a customer, its urgency.

themes  object[]  
Any themes attached to the suggestion.

themes[].uuid  string  
The UUID for the attached theme.

urls  object  
All URLs representing the suggestion.

urls.api  string  
The API URL for the suggestion.

urls.audits_api  string  
The API URL for the suggestion's audit log.

urls.html  string  
The URL for the suggestion's detail view.

Retrieve a suggestion

requires authentication

Get an existing suggestion of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "tagged_at": "2021-05-04 11:02:52",
    "uuid": "da29df2c-7f1d-4ca2-a2c4-27267be07134",
    "content": "I really wish Slack was less distracting.",
    "source": "https:\/\/slack.com\/",
    "importance": "important",
    "urgency": "",
    "no_themes": null,
    "themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "f247185a-950d-4496-9477-afa585fb50c3",
            "name": "Less Distracting",
            "status": "research",
            "description": null,
            "count": 1,
            "importance_score": 2,
            "urgency_score": 0,
            "stakeholders": [
                {
                    "first_name": "First Name",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3"
            },
            "customer_need": null,
            "importance_counts": {
                "blocker": 0,
                "important": 1,
                "nice": 0,
                "": 0
            },
            "urgency_counts": {
                "now": 0,
                "soon": 0,
                "eventually": 0,
                "": 1
            },
            "theme_value": "less distracting"
        }
    ],
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134"
    },
    "customer": {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "first_name": "First Name",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "open",
        "attributes": {
            "ltv": "",
            "plan": "Business"
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
        }
    },
    "user": {
        "email": "[email protected]",
        "first_name": "Slack",
        "last_name": "User"
    }
}

Request   

GET api/products/{product}/suggestions/{suggestion}

URL Parameters

product  string  
Product slug.

suggestion  string  
Suggestion UUID.

Response

Response Fields

created_at  string  
The date the suggestion was created.

updated_at  string  
The date the suggestion was last updated.

uuid  string  
The UUID for the suggestion.

content  string  
The content of the suggestion.

source  string  
Where the suggestion originated.

customer  object  
The customer associated with the suggestion (if it came from a customer).

customer.uuid  string  
The UUID for the associated customer.

user  object  
The user associated with the suggestion (if it was reported by a user).

importance  string  
If the suggestion came from a customer, its importance.

urgency  string  
If the suggestion came from a customer, its urgency.

themes  object[]  
Any themes attached to the suggestion.

themes[].uuid  string  
The UUID for the attached theme.

urls  object  
All URLs representing the suggestion.

urls.api  string  
The API URL for the suggestion.

urls.audits_api  string  
The API URL for the suggestion's audit log.

urls.html  string  
The URL for the suggestion's detail view.

Update a suggestion

requires authentication

Update an existing suggestion of a product.

The content is a required parameter and supports Markdown. To capture where the suggestion came from, the optional source parameter can be a URL or string of text.

A suggestion can be associated with a customer via the customer.uuid or customer.email parameter. The customer must already exist in the system. The importance and urgency attributes are only permitted when a suggestion is assigned to a customer.

If the suggestion came from a teammate, associate it with a user via user.email.

Example request:

curl -X PUT \
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"created_at":"2021-05-04T11:03:02+0000","content":"ab","source":"consequatur","customer":{"uuid":"dolore","email":"[email protected]"},"user":{"email":"iste"},"importance":"blocker","urgency":"now"}'

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'created_at' => '2021-05-04T11:03:02+0000',
            'content' => 'ab',
            'source' => 'consequatur',
            'customer' => [
                'uuid' => 'dolore',
                'email' => '[email protected]',
            ],
            'user' => [
                'email' => 'iste',
            ],
            'importance' => 'blocker',
            'urgency' => 'now',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "created_at": "2021-05-04T11:03:02+0000",
    "content": "ab",
    "source": "consequatur",
    "customer": {
        "uuid": "dolore",
        "email": "[email protected]"
    },
    "user": {
        "email": "iste"
    },
    "importance": "blocker",
    "urgency": "now"
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "updated_at": "2021-05-04T11:02:52.000000Z",
    "tagged_at": "2021-05-04 11:02:52",
    "uuid": "da29df2c-7f1d-4ca2-a2c4-27267be07134",
    "content": "I really wish Slack was less distracting.",
    "source": "https:\/\/slack.com\/",
    "importance": "important",
    "urgency": "",
    "no_themes": null,
    "themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "f247185a-950d-4496-9477-afa585fb50c3",
            "name": "Less Distracting",
            "status": "research",
            "description": null,
            "count": 1,
            "importance_score": 2,
            "urgency_score": 0,
            "stakeholders": [
                {
                    "first_name": "First Name",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/suggestion-themes\/f247185a-950d-4496-9477-afa585fb50c3"
            },
            "customer_need": null,
            "importance_counts": {
                "blocker": 0,
                "important": 1,
                "nice": 0,
                "": 0
            },
            "urgency_counts": {
                "now": 0,
                "soon": 0,
                "eventually": 0,
                "": 1
            },
            "theme_value": "less distracting"
        }
    ],
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134",
        "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134\/audits",
        "html": "https:\/\/upfocus.io\/products\/slack\/suggestions\/da29df2c-7f1d-4ca2-a2c4-27267be07134"
    },
    "customer": {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
        "first_name": "First Name",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "open",
        "attributes": {
            "ltv": "",
            "plan": "Business"
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
        }
    },
    "user": {
        "email": "[email protected]",
        "first_name": "Slack",
        "last_name": "User"
    }
}

Request   

PUT api/products/{product}/suggestions/{suggestion}

PATCH api/products/{product}/suggestions/{suggestion}

URL Parameters

product  string  
Product slug.

suggestion  string  
Suggestion UUID.

Body Parameters

created_at  string optional  
The date of the suggestion. Defaults to today. The value must be a valid date.

content  string  
The body of the suggestion. Markdown is supported.

source  string optional  
Where the suggestion originated. Can be a URL or text.

customer  object optional  
The customer associated with the suggestion (if it came from a customer).

customer.uuid  string optional  
The UUID for the associated customer.

customer.email  string optional  
The email address for the originating customer (if the suggestion came from a customer). Can be used instead of UUID. The value must be a valid email address.

user  object optional  
The user associated with the suggestion (if it was reported by a user).

user.email  string optional  
The email address for the associated user.

importance  string optional  
If the suggestion came from a customer, it's importance. The value must be one of nice, important, blocker, or .

urgency  string optional  
If the suggestion came from a customer, it's urgency. The value must be one of eventually, soon, now, or .

Response

Response Fields

created_at  string  
The date the suggestion was created.

updated_at  string  
The date the suggestion was last updated.

uuid  string  
The UUID for the suggestion.

content  string  
The content of the suggestion.

source  string  
Where the suggestion originated.

customer  object  
The customer associated with the suggestion (if it came from a customer).

customer.uuid  string  
The UUID for the associated customer.

user  object  
The user associated with the suggestion (if it was reported by a user).

importance  string  
If the suggestion came from a customer, its importance.

urgency  string  
If the suggestion came from a customer, its urgency.

themes  object[]  
Any themes attached to the suggestion.

themes[].uuid  string  
The UUID for the attached theme.

urls  object  
All URLs representing the suggestion.

urls.api  string  
The API URL for the suggestion.

urls.audits_api  string  
The API URL for the suggestion's audit log.

urls.html  string  
The URL for the suggestion's detail view.

Delete a suggestion

requires authentication

Delete an existing suggestion of a product.

Example request:

curl -X DELETE \
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/products/{product}/suggestions/{suggestion}

URL Parameters

product  string  
Product slug.

suggestion  string  
Suggestion UUID.

List suggestion audit log

requires authentication

Get all audit log entries for a suggestion of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134/audits" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134/audits',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/suggestions/da29df2c-7f1d-4ca2-a2c4-27267be07134/audits"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

{
    "message": "Unauthenticated."
}

Request   

GET api/products/{product}/suggestions/{suggestion}/audits

URL Parameters

product  string  
Product slug.

suggestion  string  
Suggestion UUID.

Survey Responses

API endpoints for managing the survey responses of a product.

List all survey responses

requires authentication

Lists all existing survey responses of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/product-survey-responses" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"direction":"desc","disappointed":"somewhat","limit":5,"sort":"email"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/product-survey-responses',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'direction' => 'desc',
            'disappointed' => 'somewhat',
            'limit' => 5,
            'sort' => 'email',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/product-survey-responses"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "direction": "desc",
    "disappointed": "somewhat",
    "limit": 5,
    "sort": "email"
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

[
    {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "tagged_at": null,
        "uuid": "a8e3389f-ed62-41ee-af5a-bc486c829fc5",
        "status": "complete",
        "disappointed": "very",
        "benefit": "We get to learn exactly why people find us valuable and where we can improve for others.",
        "refine": "Test refinement answer",
        "improve": null,
        "who": "Online product\/business owners looking for customer-based insights to guide their decisions.",
        "no_benefit_themes": null,
        "no_refine_themes": null,
        "no_improve_themes": null,
        "no_who_themes": null,
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-responses\/a8e3389f-ed62-41ee-af5a-bc486c829fc5",
            "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-responses\/a8e3389f-ed62-41ee-af5a-bc486c829fc5"
        },
        "customer": {
            "created_at": "2019-08-01T00:00:00.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "0c2b7650-c110-4e56-96d5-a65adba4d0a4",
            "first_name": "First Name",
            "last_name": "Last Name",
            "email": "[email protected]",
            "avatar_url": null,
            "product_survey_status": "open",
            "attributes": {
                "ltv": "",
                "plan": "Business"
            },
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/customers\/0c2b7650-c110-4e56-96d5-a65adba4d0a4",
                "product_survey": "https:\/\/upfocus.io\/product-survey\/0c2b7650-c110-4e56-96d5-a65adba4d0a4"
            }
        },
        "themes": [],
        "benefit_themes": [],
        "refine_themes": [],
        "improve_themes": [],
        "who_themes": []
    },
    {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "tagged_at": "2021-05-04 11:02:52",
        "uuid": "8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
        "status": "complete",
        "disappointed": "somewhat",
        "benefit": null,
        "refine": null,
        "improve": "Make it less distracting",
        "who": null,
        "no_benefit_themes": null,
        "no_refine_themes": null,
        "no_improve_themes": null,
        "no_who_themes": null,
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
            "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb"
        },
        "customer": {
            "created_at": "2019-08-01T00:00:00.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
            "first_name": "Customer Four",
            "last_name": "Last Name",
            "email": "[email protected]",
            "avatar_url": null,
            "product_survey_status": "somewhat",
            "attributes": {
                "ltv": "",
                "plan": ""
            },
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
                "product_survey": "https:\/\/upfocus.io\/product-survey\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
            }
        },
        "themes": [
            {
                "created_at": "2021-05-04T11:02:52.000000Z",
                "updated_at": "2021-05-04T11:02:52.000000Z",
                "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
                "name": "Less Noise",
                "status": "evaluate",
                "description": null,
                "type": "improve",
                "count": 1,
                "stakeholders": [
                    {
                        "first_name": "Customer Four",
                        "last_name": "Last Name",
                        "email": "[email protected]",
                        "avatar_url": null,
                        "type": "customer",
                        "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                    }
                ],
                "dev_idea_blurbs": null,
                "urls": {
                    "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                    "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                    "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
                },
                "theme_value": "less distracting"
            }
        ],
        "benefit_themes": [],
        "refine_themes": [],
        "improve_themes": [
            {
                "created_at": "2021-05-04T11:02:52.000000Z",
                "updated_at": "2021-05-04T11:02:52.000000Z",
                "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
                "name": "Less Noise",
                "status": "evaluate",
                "description": null,
                "type": "improve",
                "count": 1,
                "stakeholders": [
                    {
                        "first_name": "Customer Four",
                        "last_name": "Last Name",
                        "email": "[email protected]",
                        "avatar_url": null,
                        "type": "customer",
                        "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                    }
                ],
                "dev_idea_blurbs": null,
                "urls": {
                    "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                    "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                    "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
                },
                "theme_value": "less distracting"
            }
        ],
        "who_themes": []
    }
]

Request   

GET api/products/{product}/product-survey-responses

URL Parameters

product  string  
Product slug.

Body Parameters

direction  string optional  
The value must be one of asc or desc.

disappointed  string optional  
The value must be one of very, somewhat, or not.

limit  integer optional  

sort  string optional  
The value must be one of created_at or email.

Retrieve a survey response

requires authentication

Get an existing survey response of a product.

Example request:

curl -X GET \
    -G "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "tagged_at": "2021-05-04 11:02:52",
    "uuid": "8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
    "status": "complete",
    "disappointed": "somewhat",
    "benefit": null,
    "refine": null,
    "improve": "Make it less distracting",
    "who": null,
    "no_benefit_themes": null,
    "no_refine_themes": null,
    "no_improve_themes": null,
    "no_who_themes": null,
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
        "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb"
    },
    "customer": {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
        "first_name": "Customer Four",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "somewhat",
        "attributes": {
            "ltv": "",
            "plan": ""
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
        }
    },
    "themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
            "name": "Less Noise",
            "status": "evaluate",
            "description": null,
            "type": "improve",
            "count": 1,
            "stakeholders": [
                {
                    "first_name": "Customer Four",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
            },
            "theme_value": "less distracting"
        }
    ],
    "benefit_themes": [],
    "refine_themes": [],
    "improve_themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
            "name": "Less Noise",
            "status": "evaluate",
            "description": null,
            "type": "improve",
            "count": 1,
            "stakeholders": [
                {
                    "first_name": "Customer Four",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
            },
            "theme_value": "less distracting"
        }
    ],
    "who_themes": []
}

Request   

GET api/products/{product}/product-survey-responses/{product_survey_response}

URL Parameters

product  string  
Product slug.

product_survey_response  string  
Response UUID.

Response

Response Fields

created_at  string  
The date the survey response was created.

updated_at  string  
The date the survey response was last updated.

uuid  string  
The UUID for the survey response.

status  string  
The status of the survey response.

disappointed  string  
The disappointed value of the survey response.

benefit  string  
The benefit entered by the customer (if relevant).

refine  string  
The refinement entered by the customer (if relevant).

improve  string  
The improvement entered by the customer (if relevant).

who  string  
The persona entered by the customer (if relevant).

customer  object  
The customer associated with the survey response.

customer.uuid  string  
The UUID for the associated customer.

themes  object[]  
Any themes attached to the survey response.

themes[].uuid  string  
The UUID for the attached theme.

urls  object  
All URLs representing the survey response.

urls.api  string  
The API URL for the survey response.

urls.audits_api  string  
The API URL for the survey response's audit log.

urls.html  string  
The URL for the survey response's detail view.

Update a survey response

requires authentication

Update an existing survey response of a product.

The themes are the only fields that can be updated through the API.

Example request:

curl -X PUT \
    "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):

{
    "created_at": "2019-08-01T00:00:00.000000Z",
    "tagged_at": "2021-05-04 11:02:52",
    "uuid": "8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
    "status": "complete",
    "disappointed": "somewhat",
    "benefit": null,
    "refine": null,
    "improve": "Make it less distracting",
    "who": null,
    "no_benefit_themes": null,
    "no_refine_themes": null,
    "no_improve_themes": null,
    "no_who_themes": null,
    "urls": {
        "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb",
        "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-responses\/8fcd3c97-f767-4871-aa50-343e6e2aaeeb"
    },
    "customer": {
        "created_at": "2019-08-01T00:00:00.000000Z",
        "updated_at": "2021-05-04T11:02:52.000000Z",
        "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
        "first_name": "Customer Four",
        "last_name": "Last Name",
        "email": "[email protected]",
        "avatar_url": null,
        "product_survey_status": "somewhat",
        "attributes": {
            "ltv": "",
            "plan": ""
        },
        "urls": {
            "api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
            "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b\/audits",
            "html": "https:\/\/upfocus.io\/products\/slack\/customers\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b",
            "product_survey": "https:\/\/upfocus.io\/product-survey\/cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
        }
    },
    "themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
            "name": "Less Noise",
            "status": "evaluate",
            "description": null,
            "type": "improve",
            "count": 1,
            "stakeholders": [
                {
                    "first_name": "Customer Four",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
            },
            "theme_value": "less distracting"
        }
    ],
    "benefit_themes": [],
    "refine_themes": [],
    "improve_themes": [
        {
            "created_at": "2021-05-04T11:02:52.000000Z",
            "updated_at": "2021-05-04T11:02:52.000000Z",
            "uuid": "7ba023d7-f27a-44af-b533-178c6f37a368",
            "name": "Less Noise",
            "status": "evaluate",
            "description": null,
            "type": "improve",
            "count": 1,
            "stakeholders": [
                {
                    "first_name": "Customer Four",
                    "last_name": "Last Name",
                    "email": "[email protected]",
                    "avatar_url": null,
                    "type": "customer",
                    "uuid": "cfafe9e4-d029-44b5-8389-b8b3adba6e4b"
                }
            ],
            "dev_idea_blurbs": null,
            "urls": {
                "api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368",
                "audits_api": "https:\/\/upfocus.io\/api\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368\/audits",
                "html": "https:\/\/upfocus.io\/products\/slack\/product-survey-themes\/7ba023d7-f27a-44af-b533-178c6f37a368"
            },
            "theme_value": "less distracting"
        }
    ],
    "who_themes": []
}

Request   

PUT api/products/{product}/product-survey-responses/{product_survey_response}

PATCH api/products/{product}/product-survey-responses/{product_survey_response}

URL Parameters

product  string  
Product slug.

product_survey_response  string  
Response UUID.

Response

Response Fields

created_at  string  
The date the survey response was created.

updated_at  string  
The date the survey response was last updated.

uuid  string  
The UUID for the survey response.

status  string  
The status of the survey response.

disappointed  string  
The disappointed value of the survey response.

benefit  string  
The benefit entered by the customer (if relevant).

refine  string  
The refinement entered by the customer (if relevant).

improve  string  
The improvement entered by the customer (if relevant).

who  string  
The persona entered by the customer (if relevant).

customer  object  
The customer associated with the survey response.

customer.uuid  string  
The UUID for the associated customer.

themes  object[]  
Any themes attached to the survey response.

themes[].uuid  string  
The UUID for the attached theme.

urls  object  
All URLs representing the survey response.

urls.api  string  
The API URL for the survey response.

urls.audits_api  string  
The API URL for the survey response's audit log.

urls.html  string  
The URL for the survey response's detail view.

Delete a survey response

requires authentication

Delete an existing survey response of a product.

Example request:

curl -X DELETE \
    "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.upfocus.io/api/products/slack/product-survey-responses/da29df2c-7f1d-4ca2-a2c4-27267be07134"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/products/{product}/product-survey-responses/{product_survey_response}

URL Parameters

product  string  
Product slug.

product_survey_response  string  
Response UUID.