# Resend Workspace Invite POST /api/v1/invites/{invite_id}/resend/ Resend a pending workspace invite with extended expiry Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/invites/resend-create ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/invites/{invite_id}/resend/: post: operationId: resend-create summary: Resend Workspace Invite description: Resend a pending workspace invite with extended expiry tags: - subpackage_invites parameters: - name: invite_id in: path required: true schema: type: integer responses: '200': description: Invite resent successfully content: application/json: schema: $ref: '#/components/schemas/WorkspaceInviteDetail' '400': description: Bad Request content: application/json: schema: description: Any type '403': description: Permission denied content: application/json: schema: description: Any type '404': description: Invite not found content: application/json: schema: description: Any type components: schemas: Role553Enum: type: string enum: - '1' - '2' - '3' - '4' description: |- * `1` - Viewer * `2` - Editor * `3` - Admin * `4` - Owner title: Role553Enum Status21eEnum: type: string enum: - pending - accepted - cancelled - expired description: |- * `pending` - Pending * `accepted` - Accepted * `cancelled` - Cancelled * `expired` - Expired title: Status21eEnum WorkspaceInviteDetail: type: object properties: id: type: integer token: type: string format: uuid description: Unique token for invite identification email: type: string format: email description: Email address of the person being invited role: $ref: '#/components/schemas/Role553Enum' description: |- Role to assign when invite is accepted * `1` - Viewer * `2` - Editor * `3` - Admin * `4` - Owner role_display: type: string description: |- Get human-readable role name. Args: obj: The model instance being serialized (typically WorkspaceInvite) Returns: str: The human-readable role name, or "UNKNOWN" if not found status: $ref: '#/components/schemas/Status21eEnum' description: |- Current status of the invitation * `pending` - Pending * `accepted` - Accepted * `cancelled` - Cancelled * `expired` - Expired message: type: string description: Optional message from the inviter created_at: type: string format: date-time expires_at: type: string format: date-time description: When this invite expires accepted_at: type: - string - 'null' format: date-time description: When the invite was accepted invited_by_email: type: string format: email workspace_name: type: string is_expired: type: boolean description: |- Check if invite is expired. Args: obj: The model instance being serialized (typically WorkspaceInvite) Returns: bool: True if the invite is expired, False otherwise required: - id - token - email - role - role_display - status - message - created_at - expires_at - accepted_at - invited_by_email - workspace_name - is_expired description: Serializer for detailed workspace invite operations. title: WorkspaceInviteDetail ``` ## SDK Code Examples ```python import requests url = "https://api.example.com/api/v1/invites/1/resend/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v1/invites/1/resend/'; const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/invites/1/resend/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) 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)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/invites/1/resend/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/invites/1/resend/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.example.com/api/v1/invites/1/resend/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/api/v1/invites/1/resend/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/invites/1/resend/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```