Assign award to user
curl --request POST \
--url https://api.tightknit.ai/admin/v0/awards/{award_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'content-type: <content-type>' \
--data '
{
"recipient": {
"slack_user_id": "<string>"
},
"sender": {
"slack_user_id": "<string>"
},
"send_anonymously": false
}
'import requests
url = "https://api.tightknit.ai/admin/v0/awards/{award_id}/assign"
payload = {
"recipient": { "slack_user_id": "<string>" },
"sender": { "slack_user_id": "<string>" },
"send_anonymously": False
}
headers = {
"content-type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'content-type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
recipient: {slack_user_id: '<string>'},
sender: {slack_user_id: '<string>'},
send_anonymously: false
})
};
fetch('https://api.tightknit.ai/admin/v0/awards/{award_id}/assign', 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.tightknit.ai/admin/v0/awards/{award_id}/assign",
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([
'recipient' => [
'slack_user_id' => '<string>'
],
'sender' => [
'slack_user_id' => '<string>'
],
'send_anonymously' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"content-type: <content-type>"
],
]);
$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.tightknit.ai/admin/v0/awards/{award_id}/assign"
payload := strings.NewReader("{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
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.tightknit.ai/admin/v0/awards/{award_id}/assign")
.header("content-type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tightknit.ai/admin/v0/awards/{award_id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}Award
Assign award to user
Assigns an award to a user and sends a Slack notification.
POST
/
admin
/
v0
/
awards
/
{award_id}
/
assign
Assign award to user
curl --request POST \
--url https://api.tightknit.ai/admin/v0/awards/{award_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'content-type: <content-type>' \
--data '
{
"recipient": {
"slack_user_id": "<string>"
},
"sender": {
"slack_user_id": "<string>"
},
"send_anonymously": false
}
'import requests
url = "https://api.tightknit.ai/admin/v0/awards/{award_id}/assign"
payload = {
"recipient": { "slack_user_id": "<string>" },
"sender": { "slack_user_id": "<string>" },
"send_anonymously": False
}
headers = {
"content-type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'content-type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
recipient: {slack_user_id: '<string>'},
sender: {slack_user_id: '<string>'},
send_anonymously: false
})
};
fetch('https://api.tightknit.ai/admin/v0/awards/{award_id}/assign', 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.tightknit.ai/admin/v0/awards/{award_id}/assign",
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([
'recipient' => [
'slack_user_id' => '<string>'
],
'sender' => [
'slack_user_id' => '<string>'
],
'send_anonymously' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"content-type: <content-type>"
],
]);
$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.tightknit.ai/admin/v0/awards/{award_id}/assign"
payload := strings.NewReader("{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
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.tightknit.ai/admin/v0/awards/{award_id}/assign")
.header("content-type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tightknit.ai/admin/v0/awards/{award_id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"recipient\": {\n \"slack_user_id\": \"<string>\"\n },\n \"sender\": {\n \"slack_user_id\": \"<string>\"\n },\n \"send_anonymously\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"hint": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
application/json Path Parameters
Minimum string length:
1Body
application/json
The user identifier, which must be exactly one of the following: Slack user ID, email, or Tightknit profile ID
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
The user identifier, which must be exactly one of the following: Slack user ID, email, or Tightknit profile ID
Show child attributes
Show child attributes
Response
Award assigned
Was this page helpful?
⌘I

