Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
POST
/v1/orgs/{id}/invitations
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/orgs/example/invitations"
payload := strings.NewReader("{ \"email\": \"example\", \"role\": \"member\" }")
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(res) fmt.Println(string(body))
}const url = 'https://api.elefork.com/v1/orgs/example/invitations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example","role":"member"}'};
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/orgs/example/invitations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "role": "member" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string
role
string
Responses
Section titled “Responses”Invited
Media typeapplication/json
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" }}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" }}