curl --request POST \
--url https://api.getoneprofile.ai/design-partner/slack-channel/invite/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://api.getoneprofile.ai/design-partner/slack-channel/invite/"
payload = { "email": "jsmith@example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.getoneprofile.ai/design-partner/slack-channel/invite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getoneprofile.ai/design-partner/slack-channel/invite/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/design-partner/slack-channel/invite/"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoneprofile.ai/design-partner/slack-channel/invite/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/design-partner/slack-channel/invite/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"channel_failure_message": "<string>",
"channel_name": "<string>",
"channel_state": "none",
"channel_url": "<string>",
"invite_can_send": true,
"invite_email": "<string>",
"invite_message": "<string>",
"invite_sent_at": "2023-11-07T05:31:56Z",
"invite_status": "none"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Send the workspace's shared Slack channel invite
Send the workspace’s invitation to the address in the body. With no channel yet this starts the run that creates one and sends the invitation from inside it, and answers provisioning for the page to poll; with a channel ready the invitation goes out immediately.
A workspace gets one invitation to its channel, so a second call while the first is still live is a 409 rather than a second email. Nothing here happens on a page load: the address is required, so a call without a body is a 422.
A refusal Slack itself made, their Slack being on a free plan for instance, is not an error: it comes back in the body with a sentence to show them.
curl --request POST \
--url https://api.getoneprofile.ai/design-partner/slack-channel/invite/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://api.getoneprofile.ai/design-partner/slack-channel/invite/"
payload = { "email": "jsmith@example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.getoneprofile.ai/design-partner/slack-channel/invite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getoneprofile.ai/design-partner/slack-channel/invite/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/design-partner/slack-channel/invite/"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoneprofile.ai/design-partner/slack-channel/invite/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/design-partner/slack-channel/invite/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"channel_failure_message": "<string>",
"channel_name": "<string>",
"channel_state": "none",
"channel_url": "<string>",
"invite_can_send": true,
"invite_email": "<string>",
"invite_message": "<string>",
"invite_sent_at": "2023-11-07T05:31:56Z",
"invite_status": "none"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
The address a workspace wants its shared-channel invitation sent to.
Where Slack sends the invitation. Typed by the caller rather than taken from their account, because the person who should be in the channel is not always the person setting it up.
320Response
Successful Response
The workspace's shared Slack channel and its one invitation.
Both belong to the organization, so every member of a partner workspace reads the same block: the same channel, the same invitation, whoever sent it. A Slack Connect guest can invite their own colleagues, so the second person through the door is Slack's job rather than ours.
What to tell the reader when provisioning failed. Null otherwise.
The channel's name, without the leading hash. Null until it is ready.
Where the workspace's channel is. 'none' means nobody has sent an invite yet, which is what puts the form on the page. 'provisioning' is the run that creates it, which the page polls. 'failed' carries a sentence.
none, provisioning, ready, failed A link that opens the channel in the reader's Slack. Null until it is ready.
Whether to offer the form. False while a run is in flight, while the invitation that went out is still live at Slack, and after a refusal about our own Slack workspace's settings that no retry fixes. Decided here so the page holds no copy of the lifetime and no opinion about which refusals are worth another press.
The address the invitation went to.
What to tell the reader when Slack refused, already written for a person rather than a log. Null when nothing was refused.
When Slack accepted the invitation.
What became of the workspace's invitation.
none, sent, refused Was this page helpful?