Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
POST
/v1/invitations/accept
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/invitations/accept"
payload := strings.NewReader("{ \"token\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "elefork_session=<elefork_session>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.elefork.com/v1/invitations/accept';const options = { method: 'POST', headers: { cookie: 'elefork_session=<elefork_session>', 'Content-Type': 'application/json' }, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.elefork.com/v1/invitations/accept \ --header 'Content-Type: application/json' \ --cookie elefork_session=<elefork_session> \ --data '{ "token": "example" }'The invitation must be addressed to the signed-in user’s email.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
token
required
string
Example generated
{ "token": "example"}Responses
Section titled “Responses”Joined
Media typeapplication/json
object
org_id
required
string
role
required
string
Example generated
{ "org_id": "example", "role": "example"}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Temporarily unavailable; retry after the Retry-After seconds. Codes:
database_unavailable (the metadata database is failing over) and
cube_admission (a compute node runs a sandbox shim below the
platform minimum, so creates, forks, checkpoints and resets are
refused until it is upgraded).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Headers
Section titled “Headers”Retry-After
integer