Skip to main content
POST
/
tasks
cURL
curl --request POST \
  --url https://sandbox.withclasp.com/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "memo": "<string>",
  "completed_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://sandbox.withclasp.com/tasks"

payload = {
"memo": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
memo: '<string>',
completed_at: '2023-11-07T05:31:56Z',
started_at: '2023-11-07T05:31:56Z'
})
};

fetch('https://sandbox.withclasp.com/tasks', 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://sandbox.withclasp.com/tasks",
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([
'memo' => '<string>',
'completed_at' => '2023-11-07T05:31:56Z',
'started_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://sandbox.withclasp.com/tasks"

payload := strings.NewReader("{\n \"memo\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.withclasp.com/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"memo\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.withclasp.com/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memo\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "employer": "<string>",
  "assignee": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "memo": "<string>",
  "completed_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key authentication with required prefix "Bearer"

Body

category
enum<string>
required
  • member_update - Member Update
  • dependent_update - Dependent Update
  • enrollment_update - Enrollment Update
Available options:
member_update,
dependent_update,
enrollment_update
memo
string | null
completed_at
string<date-time> | null
started_at
string<date-time> | null

Response

201 - application/json
id
string
required
read-only
Pattern: ^[-a-zA-Z0-9_]+$
category
enum<string>
required
  • member_update - Member Update
  • dependent_update - Dependent Update
  • enrollment_update - Enrollment Update
Available options:
member_update,
dependent_update,
enrollment_update
employer
string
required
read-only
assignee
string
required
read-only
created_at
string<date-time>
required
read-only
memo
string | null
completed_at
string<date-time> | null
started_at
string<date-time> | null